//
// Escape
//

#include "stagesetup.h"

// Characters
#define CHR_JONATHAN 0x21
#define CHR_ELVIS    0x22

// Objects
#define OBJ_HOVERBED       0x00 // with Elvis on it
#define OBJ_MEDPACK_BOND   0x01
#define OBJ_TERMINAL1      0x03
#define OBJ_TERMINAL2      0x04
#define OBJ_WALLMINE       0x02
#define OBJ_HOVERBED_EMPTY 0x11
#define OBJ_MEDPACK_SWITCH 0x14
#define OBJ_UFO1           0x1f
#define OBJ_UFO2           0x22
#define OBJ_MEDPACK_COOP   0x20
#define OBJ_WALLOBJECT     0x21
#define OBJ_MEDPACK_GLASS  0x2a
#define OBJ_HOVERBIKE      0x35
#define OBJ_WALLDOOR       0x38
#define OBJ_FALCON2SCOPE1  0x39
#define OBJ_FALCON2SCOPE2  0x3a
#define OBJ_REMOTEMINES    0x3b

// Stage flags
#define STAGEFLAG_INTRO_DONE                   0x00000001
#define STAGEFLAG_TRIGGER_MEDPACK_FINISH       0x00000002
#define STAGEFLAG_JON_SAID_MAINT_HATCH         0x00000004
#define STAGEFLAG_TRIGGER_JETBIKE_MESSAGE      0x00000008
#define STAGEFLAG_UFO_LEAVING                  0x00000010
#define STAGEFLAG_GAS_ON                       0x00000020
#define STAGEFLAG_JON_SHOT_WHILE_PLANTING      0x00000040
#define STAGEFLAG_MEDPACK_SWITCH_DESTROYED     0x00000080
#define STAGEFLAG_COLLECTED_MEDPACK            0x00000100
#define STAGEFLAG_00000200                     0x00000200 // never set
#define STAGEFLAG_MET_JON                      0x00000400
#define STAGEFLAG_ELVIS_REVIVED                0x00000800
#define STAGEFLAG_ELVIS_DEAD                   0x00001000
#define STAGEFLAG_ENTERED_HANGAR               0x00002000
#define STAGEFLAG_ESCAPED                      0x00004000
#define STAGEFLAG_ELVIS_STASHED                0x00008000
#define STAGEFLAG_JON_ENTERED_MINE_ROOM        0x00010000
#define STAGEFLAG_JON_PLANTING_EXPLOSIVES      0x00020000
#define STAGEFLAG_JON_FINISHED_EXPLOSIVES      0x00040000
#define STAGEFLAG_JON_DEAD                     0x00080000
#define STAGEFLAG_WALL_EXPLODED                0x00100000
#define STAGEFLAG_HANGAR_TERMINAL_DESTROYED    0x00200000
#define STAGEFLAG_INNER_DOOR_OPENING           0x00400000
#define STAGEFLAG_OUTER_DOOR_OPENING           0x00800000
#define STAGEFLAG_STARTED_OUTRO                0x01000000
#define STAGEFLAG_JON_WAITING_AT_UFO           0x02000000
#define STAGEFLAG_HANGAR_CONVERSATION_FINISHED 0x04000000
#define STAGEFLAG_HANGAR_X_MUSIC_STARTED       0x08000000
#define STAGEFLAG_JO_DOING_TERMINALS           0x10000000
#define STAGEFLAG_JO_ESCAPE_STARTED            0x20000000
#define STAGEFLAG_MEDPACK_STARTED              0x40000000
#define STAGEFLAG_BOTH_HANGAR_DOORS_OPEN       0x80000000

// AI Lists
#define AILIST_GAS_DAMAGE                   0x0401
#define AILIST_JONATHAN_WAITING_FOR_MEETUP  0x0402
#define AILIST_INIT_JONATHAN                0x0403
#define AILIST_JONATHAN_FOLLOWING_AND_MINE  0x0404
#define AILIST_JONATHAN_SHOT_WHILE_PLANTING 0x0405
#define AILIST_SPAWNGROUP1_GUARD            0x0407
#define AILIST_SPAWNGROUP2_GUARD            0x0408
#define AILIST_SPAWNGROUP3_GUARD            0x0409
#define AILIST_SPAWNGROUP4_GUARD            0x040a
#define AILIST_ELVIS_FOLLOW                 0x040b
#define AILIST_HIDDEN_GUARDTYPE1            0x040c
#define AILIST_HIDDEN_GUARDTYPE2            0x040d
#define AILIST_HIDDEN_BIOTECH               0x040e
#define AILIST_INIT_ELVIS                   0x0412
#define AILIST_JONATHAN_HANGAR              0x0413
#define AILIST_OUTRO                        0x0414
#define AILIST_UFO_EXIT                     0x0415
#define AILIST_SPAWN_DURING_FOLLOW          0x0416
#define AILIST_INIT_FOLLOWER_CLONE          0x0417
#define AILIST_FOLLOWER_CLONE               0x0418
#define AILIST_INIT_BIOTECH                 0x0419
#define AILIST_INIT_SUPERDRAGON_GUARD       0x041a
#define AILIST_JONATHAN_AFTER_TERMINALS     0x041b
#define AILIST_ELVIS_GO_TO_UFO              0x041c

// Other
#define SPAWNGROUP1 0x09
#define SPAWNGROUP2 0x0a
#define SPAWNGROUP3 0x0b
#define SPAWNGROUP4 0x0d

extern s32 intro[];
extern u32 props[];
extern struct path paths[];
extern struct ailist ailists[];

struct stagesetup setup = {
	NULL,
	NULL,
	NULL,
	intro,
	props,
	paths,
	ailists,
	NULL,
};

u32 props[] = {
	briefing(BRIEFINGTYPE_LOCATION, L_TRA_001)
	briefing(BRIEFINGTYPE_TEXT_PA,  L_TRA_000)
	briefing(BRIEFINGTYPE_TEXT_SA,  L_TRA_002)
	briefing(BRIEFINGTYPE_TEXT_A,   L_TRA_003)

	beginobjective(0, L_TRA_009, (DIFFBIT_PA | DIFFBIT_PD)) // "Locate alien tech medpack"
		complete_flags(STAGEFLAG_COLLECTED_MEDPACK)
		fail_flags(STAGEFLAG_00000200)
		fail_flags(STAGEFLAG_MEDPACK_SWITCH_DESTROYED)
	endobjective

	beginobjective(1, L_TRA_010, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Rendezvous with CI spy"
		complete_flags(STAGEFLAG_MET_JON)
		fail_flags(STAGEFLAG_JON_DEAD)
	endobjective

	beginobjective(2, L_TRA_012, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Locate secret hangar"
		complete_flags(STAGEFLAG_ENTERED_HANGAR)
	endobjective

	beginobjective(3, L_TRA_011, (DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Revive Maian Bodyguard"
		complete_flags(STAGEFLAG_ELVIS_REVIVED)
	endobjective

	beginobjective(4, L_TRA_013, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Escape from Area 51"
		complete_flags(STAGEFLAG_ESCAPED)
		fail_flags(STAGEFLAG_HANGAR_TERMINAL_DESTROYED)
		fail_flags(STAGEFLAG_ELVIS_DEAD)
	endobjective

	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x23, PAD_TRA_03BE, BODY_BIOTECH, HEAD_DUNCAN2, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x24, PAD_TRA_012E, BODY_BIOTECH, HEAD_JAMIE, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_BASICGUARD, 0x00, PAD_TRA_03E0, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0000, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x01, PAD_TRA_03E1, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0001, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x02, PAD_TRA_03E2, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0002, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x03, PAD_TRA_03DF, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0003, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x04, PAD_TRA_03E3, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0004, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x05, PAD_TRA_03E4, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0005, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x06, PAD_TRA_03E5, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0006, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x07, PAD_TRA_03E6, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0007, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x08, PAD_TRA_03E7, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_INIT_SUPERDRAGON_GUARD, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0008, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ONLYONSA | SPAWNFLAG_ONLYONPA | SPAWNFLAG_BASICGUARD, 0x09, PAD_TRA_03E9, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_SPAWN_DURING_FOLLOW, -1, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0009, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ONLYONSA | SPAWNFLAG_ONLYONPA | SPAWNFLAG_BASICGUARD, 0x0a, PAD_TRA_03EA, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_SPAWN_DURING_FOLLOW, -1, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ONLYONSA | SPAWNFLAG_ONLYONPA | SPAWNFLAG_BASICGUARD, 0x0b, PAD_TRA_03EB, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_SPAWN_DURING_FOLLOW, -1, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000b, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ONLYONSA | SPAWNFLAG_ONLYONPA | SPAWNFLAG_BASICGUARD, 0x0c, PAD_TRA_03EC, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_SPAWN_DURING_FOLLOW, -1, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x0d, PAD_TRA_03E6, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000d, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x0e, PAD_TRA_03E5, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000e, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ONLYONSA | SPAWNFLAG_ONLYONPA | SPAWNFLAG_BASICGUARD, 0x0f, PAD_TRA_03FA, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000f, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
#if VERSION < VERSION_NTSC_1_0
	// Same chr as above but only appears on Agent, and at a different pad
	chr(SPAWNFLAG_ONLYONA | SPAWNFLAG_BASICGUARD, 0x0f, PAD_TRA_0153, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x000f, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
#endif
	chr(SPAWNFLAG_BASICGUARD, 0x10, PAD_TRA_03F1, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1, 8, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_PREWARNED, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0010, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x11, PAD_TRA_03F2, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1, 8, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_PREWARNED, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0011, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x12, PAD_TRA_03F3, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1, 8, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_PREWARNED, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0012, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x13, PAD_TRA_03F4, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1, 8, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_PREWARNED, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0013, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x14, PAD_TRA_016A, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0014, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x15, PAD_TRA_03F7, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0015, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x16, PAD_TRA_03F8, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE1, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0016, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x21, PAD_TRA_03F9, BODY_A51AIRMAN, HEAD_JONATHAN, AILIST_INIT_JONATHAN, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2, CHRFLAG1_AIVSAI_ADVANTAGED | CHRFLAG1_PUNCHHARDER, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDY357, 0x0021, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DY357MAGNUM)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x22, PAD_TRA_010A, BODY_ELVIS1, HEAD_ELVIS, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_HOLD_POSITION | CHRFLAG0_CANLOSEGUN, 0, TEAM_ALLY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	chr(0, 0x17, PAD_TRA_0119, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0017, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(0, 0x18, PAD_TRA_0111, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0018, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(0, 0x19, PAD_TRA_010C, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0019, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(0, 0x1a, PAD_TRA_00ED, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1b, PAD_TRA_00E1, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001b, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1c, PAD_TRA_00DB, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1d, PAD_TRA_00B7, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001d, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1e, PAD_TRA_00A8, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001e, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1f, PAD_TRA_00A1, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0F, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x001f, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x20, PAD_TRA_00A0, BODY_AREA51GUARD, HEAD_RANDOM, AILIST_HIDDEN_GUARDTYPE2, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0F, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x0020, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x25, PAD_TRA_013A, BODY_BIOTECH, HEAD_BIOTECH, AILIST_HIDDEN_BIOTECH, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x0025, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x26, PAD_TRA_013C, BODY_BIOTECH, HEAD_BIOTECH, AILIST_HIDDEN_BIOTECH, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x0026, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x27, PAD_TRA_013A, BODY_BIOTECH, HEAD_BIOTECH, AILIST_HIDDEN_BIOTECH, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x0027, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x28, PAD_TRA_0134, BODY_BIOTECH, HEAD_BIOTECH, AILIST_HIDDEN_BIOTECH, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x0028, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x29, PAD_TRA_0118, BODY_BIOTECH, HEAD_BIOTECH, AILIST_INIT_BIOTECH, -1, -1, 1000, 6, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x0029, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x2a, PAD_TRA_0115, BODY_BIOTECH, HEAD_BIOTECH, AILIST_INIT_BIOTECH, -1, -1, 1000, 6, CHRFLAG0_AIVSAI | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_SEARCHSAMEROOM, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRUGGUN, 0x002a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_TRANQUILIZER)
	chr(SPAWNFLAG_BASICGUARD, 0x2b, PAD_TRA_03BC, BODY_AREA51GUARD, HEAD_BEAU1, AILIST_HIDDEN_BIOTECH, -1, -1, 1000, 100, CHRFLAG0_AIVSAI | CHRFLAG0_HOLD_POSITION | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSUPERDRAGON, 0x002b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SUPERDRAGON)
	tag(0x00, 1)
	hover_prop(0x0100, MODEL_HOVERBED, PAD_TRA_03BD, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE | OBJFLAG3_INTERACTABLE | OBJFLAG3_HOVERBEDSHIELD, 1000, HOVTYPE_BED)
	tag(0x11, 1)
	hover_prop(0x0100, MODEL_A51TROLLEY, PAD_TRA_0120, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE, 1000, HOVTYPE_BED)
	hover_prop(0x0100, MODEL_HOVERBED, PAD_TRA_0122, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE | OBJFLAG3_HOVERBEDSHIELD, 1000, HOVTYPE_BED)
	tag(0x35, 1)
	hoverbike(0x0100, MODEL_HOVBIKE, PAD_TRA_03FB, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE | OBJFLAG3_GEOCYL, 1000)
	hover_prop(0x0100, MODEL_HOVERCRATE1, PAD_TRA_011D, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_DEACTIVATED | OBJFLAG_HOVERPROP_20000000, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE, 1000, HOVTYPE_CRATE)
	tag(0x17, 2)
	tag(0x18, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_027F, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_027E, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_027D, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_027C, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x15, 2)
	tag(0x16, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_027A, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_027B, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0278, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0279, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0277, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0276, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x19, 2)
	tag(0x1a, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0274, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0275, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0273, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0272, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0270, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0271, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_026F, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_026E, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_026C, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_026D, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_026B, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_026A, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x3c, 2)
	tag(0x3d, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0268, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0269, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x1b, 2)
	tag(0x1c, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0266, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0267, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x1d, 2)
	tag(0x1e, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0280, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0281, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02B7, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02B8, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02B9, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02BA, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02BB, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02BC, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x06, 2)
	tag(0x07, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0283, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0282, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0284, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_0285, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_028B, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_028A, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_GL, PAD_TRA_0286, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_WINDOWED, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x01f407d0, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0287, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, 0, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x33, 2)
	tag(0x34, 2)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_A51_HORIZ_DOOR_GL, PAD_TRA_0289, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_WINDOWED, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x01f407d0, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0288, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, 0, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x00000000, 0xffffffff, 0x00000000)
#else
	door(0x0100, MODEL_A51_HORIZ_DOOR_GL, PAD_TRA_0289, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_WINDOWED, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x01f407d0, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0288, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, 0, DOORTYPE_VERTICAL, 0x00000000, 0x00000078, 0x00000000, 0xffffffff, 0x00000000)
#endif
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02A4, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000100)
	tag(0x32, 1)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02A5, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000300)
	tag(0x0c, 1)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02A6, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000000, 0x00000100)
	tag(0x0b, 1)
	door(0x0100, MODEL_A51_HORIZ_DOOR_SECRET, PAD_TRA_028E, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000100)
	tag(0x0a, 1)
	door(0x0100, MODEL_A51_HORIZ_DOOR_SECRET, PAD_TRA_02C5, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000002, 0x0000003c, 0x00000000, 0x00000000, 0x00000100)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_0292, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_0293, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_0294, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_0295, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x0d, 1)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_02AE, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000020, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_0299, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_0298, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_GL, PAD_TRA_02A8, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_WINDOWED, DOORTYPE_VERTICAL, 0x00000040, 0x00000258, 0x01f407d0, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02A7, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, 0, DOORTYPE_VERTICAL, 0x00000040, 0x00000258, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_029A, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_029B, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x31, 1)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_029C, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_SLIDING, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_029D, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_SLIDING, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x30, 1)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_029E, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_SLIDING, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_029F, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000c000, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_SLIDING, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x0e, 2)
	tag(0x0f, 2)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_02A1, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_AUTOCUTSCENESOUNDS, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_02A0, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_028C, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_028D, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_028F, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	tag(0x10, 1)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_0290, OBJFLAG_DEACTIVATED, 0, OBJFLAG3_AUTOCUTSCENESOUNDS, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	tag(0x05, 1)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_0291, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	tag(0x08, 2)
	tag(0x09, 2)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_02A2, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000a666, 0x0000a666, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000004, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_02A3, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000a666, 0x0000a666, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000004, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02E5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02E6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02E7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02E8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02E9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02EA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02EB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02EC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02ED, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02EE, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02EF, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02F0, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02F1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02F2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02F3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02F4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_TRA_02F5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_02F6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_TRA_02F7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x38, 4)
	tag(0x21, 4)
	blocked_path(2, 0x0173, 0x013f)
	conditional_scenery(1, 2, 3)
	door(0x0100, MODEL_A51_UNEXP2, PAD_TRA_0424, OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00000000, 0x00010000, 0x03e80000, 0x03e80000, 0x00010000, 0, DOORTYPE_SLIDING, 0x00000080, 0x00000001, 0x00010000, 0x00000000, 0x00000000)
	stdobject(0x0100, MODEL_A51_UNEXP3, PAD_TRA_0425, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	stdobject(0x0100, MODEL_A51_EXP2, PAD_TRA_0423, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_02B3, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_TRA_02B4, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_TRA_02AF, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_TRA_02B0, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0321, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0327, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0322, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0328, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
#else
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0321, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_TRA_0327, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
#endif
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02B2, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000080, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02B1, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000080, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02BD, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02BE, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02BF, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02C0, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02C1, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02C2, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02C3, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02C4, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x02, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_TRA_013F, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x03, 1)
	singlemonitor(0x0100, MODEL_SINISTERSTATION, PAD_TRA_048E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 3)
	tag(0x04, 1)
	singlemonitor(0x0033, MODEL_SINISTERSTATION, PAD_TRA_03FD, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 3)
	glass(0x0100, MODEL_MEDLABWIN1, PAD_TRA_0436, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	glass(0x0100, MODEL_MEDLABWIN2, PAD_TRA_0437, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	glass(0x0100, MODEL_MEDLABWIN2, PAD_TRA_0438, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	glass(0x0100, MODEL_MEDLABWIN1, PAD_TRA_0439, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	glass(0x0100, MODEL_MEDLABWIN2, PAD_TRA_043A, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	glass(0x0100, MODEL_MEDLABWIN2, PAD_TRA_043B, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH, OBJFLAG2_BULLETPROOF, 0, 1000)
	tag(0x1f, 1)
	stdobject(0x0100, MODEL_ELVIS_SAUCER, -1, OBJFLAG_FALL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x22, 1)
	stdobject(0x0100, MODEL_ELVIS_SAUCER, -1, OBJFLAG_FALL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0461, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0462, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0463, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0464, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0465, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0466, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0467, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0468, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0469, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046C, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046D, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_046F, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0470, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0471, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0472, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0473, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0474, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0476, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0477, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0479, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047C, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047D, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_047F, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0480, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0481, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0482, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0483, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0484, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0485, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0486, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0487, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0488, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_TRA_0489, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0491, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0492, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0493, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0494, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0495, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0496, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0497, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0498, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_0499, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049C, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049D, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_049F, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_04A0, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_04A1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_04A2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51WASTEBIN, PAD_TRA_04A3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04A9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04AA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04AB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51DIVIDE, PAD_TRA_04AC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_TRA_031A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	tag(0x23, 7)
	tag(0x24, 7)
	tag(0x25, 7)
	tag(0x26, 7)
	tag(0x27, 7)
	tag(0x28, 7)
	tag(0x29, 7)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04B7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04B8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04B9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04BA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04BB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04BC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_04BE, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_PUSHABLE | OBJFLAG3_LONGPUSHRANGE, 1000)
	tag(0x2a, 1)
	glass(0x0100, MODEL_MEDLABWIN2, PAD_TRA_043C, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF, 0, 1000)
	tag(0x12, 2)
	tag(0x13, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_GL, PAD_TRA_0264, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, DOORFLAG_WINDOWED, DOORTYPE_VERTICAL, 0x00000040, 0x00000258, 0x01f407d0, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_0265, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00000ccc, 0, DOORTYPE_VERTICAL, 0x00000040, 0x00000258, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x14, 1)
	stdobject(0x0100, MODEL_A51DESKENT, PAD_TRA_048A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_048B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_048C, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_LAB_CONTAINER, PAD_TRA_048D, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	tag(0x01, 1)
	weapon(0x0100, MODEL_CHRBRIEFCASE, PAD_TRA_037F, OBJFLAG_FALL, 0, 0, WEAPON_AUTOSURGEON)
	rename_object(-1, WEAPON_AUTOSURGEON, L_TRA_020, L_TRA_021, L_TRA_022, L_TRA_023, L_TRA_024) // "Obtain alien medpack."
	tag(0x20, 1)
	weapon(0x0100, MODEL_CHRBRIEFCASE, -1, OBJFLAG_FALL, 0, 0, WEAPON_AUTOSURGEON)
	rename_object(-1, WEAPON_AUTOSURGEON, L_TRA_020, L_TRA_021, L_TRA_022, L_TRA_023, L_TRA_024) // "Obtain alien medpack."
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_04D0, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_04D1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_04D2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_04D3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04D8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04D9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DD, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DE, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04DF, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04E0, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_TRA_04E1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	tag(0x2b, 1)
	stdobject(0x0100, MODEL_A51TABLE, PAD_TRA_0129, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x2c, 2)
	tag(0x2d, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02DC, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x0000028f, 0, DOORTYPE_VERTICAL, 0x00000000, 0x00000258, 0x00000000, 0x00000001, 0x00000400)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02DD, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x0000028f, 0, DOORTYPE_VERTICAL, 0x00000000, 0x9ffffff6, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x2e, 2)
	tag(0x2f, 2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02DE, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x0000028f, 0, DOORTYPE_VERTICAL, 0x00000000, 0x00000258, 0x00000000, 0x00000001, 0x00000400)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02DF, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x0000028f, 0, DOORTYPE_VERTICAL, 0x00000000, 0x9ffffff6, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x46, 2)
	tag(0x3e, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_033C, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x033c, 0x033d, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045C, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x48, 2)
	tag(0x40, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_0340, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0340, 0x0341, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_0459, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x4a, 2)
	tag(0x42, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_0344, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0344, 0x0345, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045A, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x4c, 2)
	tag(0x44, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_0348, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0348, 0x0349, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045B, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x47, 2)
	tag(0x3f, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_033F, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x033f, 0x033e, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045E, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x49, 2)
	tag(0x41, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_0343, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0343, 0x0342, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045F, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x4b, 2)
	tag(0x43, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_0347, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0347, 0x0346, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_0460, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x4d, 2)
	tag(0x45, 2)
	lift(0x0100, MODEL_CHAMBER, PAD_TRA_034B, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x034b, 0x034a, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_TRA_045D, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, 0, OBJFLAG3_INTERACTABLE, 1000, 18)
	stdobject(0x0100, MODEL_A51_EXP1, PAD_TRA_0421, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	stdobject(0x0100, MODEL_A51GRATE, PAD_TRA_0443, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51GRATE, PAD_TRA_0444, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x4e, 1)
	lift(0x0100, MODEL_A51_LIFT_THINWALL, PAD_TRA_0336, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0336, 0x0337, -1, -1, 0x00000001, 0x00000002, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x20000000)
	door(0x0100, MODEL_A51LIFTDOOR, PAD_TRA_02E4, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, OBJFLAG3_80000000, 1000, 0x0000cccc, 0x00010000, 0x00000888, 0x00000888, 0x00000147, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51LIFTDOOR, PAD_TRA_02E3, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, OBJFLAG3_80000000, 1000, 0x0000cccc, 0x00010000, 0x00000888, 0x00000888, 0x00000147, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000300)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 1)
	stdobject(0x0100, MODEL_A51GRATE, PAD_TRA_0449, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x4f, 4)
	tag(0x50, 4)
	tag(0x51, 4)
	tag(0x52, 4)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02AA, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000080, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02AB, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000080, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_TRA_02AC, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000080, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_TRA_02AD, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000080, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
#if VERSION >= VERSION_NTSC_1_0
	tag(0x53, 2)
	tag(0x54, 2)
	door(0x0100, MODEL_A51GATE_L, PAD_TRA_02B5, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00000ccc, 0x00014000, 0x00000111, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0x00000001, 0x00001800)
	door(0x0100, MODEL_A51GATE_R, PAD_TRA_02B6, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00000ccc, 0x00014000, 0x00000111, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0xffffffff, 0x00001800)
#endif
	tag(0x36, 1)
	shield(0x0100, MODEL_CHRSHIELD, 0x0028, OBJFLAG_FALL | OBJFLAG_ASSIGNEDTOCHR, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
	tag(0x37, 1)
	shield(0x0100, MODEL_CHRSHIELD, PAD_TRA_037F, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
	tag(0x39, 2)
	tag(0x3a, 2)
	weapon(0x0100, MODEL_CHRFALCON2SCOPE, 0x0023, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_FALCON2_SCOPE)
	weapon(0x0100, MODEL_CHRFALCON2SCOPE, 0x0024, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_FALCON2_SCOPE)
	link_guns(-1, -2)
	tag(0x3b, 1)
	weapon(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_TRA_0567, OBJFLAG_FALL | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE, OBJFLAG2_IMMUNETOANTI | OBJFLAG2_INVISIBLE, 0, WEAPON_REMOTEMINE)
	pad_effect(0x00000001, 0x00000129)
	endprops
};

s32 intro[] = {
	spawn(PAD_TRA_012F)
	intro_weapon(WEAPON_FALCON2_SCOPE, -1)
	ammo(AMMOTYPE_PISTOL, 100)
	ammo(AMMOTYPE_REMOTE_MINE, 2)
	outfit(OUTFIT_LAB)
	endintro
};

u8 func1400_setup_counterop[] = {
	yield
	set_chr_team(CHR_ANTI, TEAM_ENEMY)
	set_ailist(CHR_SELF, GAILIST_REBUILD_GROUPS)
	endlist
};

u8 func1001_objectives_failed_msg[] = {
	yield
	set_ailist(CHR_SELF, GAILIST_SHOW_OBJ_FAILED_MSG)
	endlist
};

u8 func1022_gas_damage_bond[] = {
	set_target_chr(CHR_BOND)
	set_ailist(CHR_SELF, AILIST_GAS_DAMAGE)
	endlist
};

u8 func1023_gas_damage_coop[] = {
	set_target_chr(CHR_COOP)
	if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x32)
	set_ailist(CHR_SELF, AILIST_GAS_DAMAGE)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0401_gas_damage[] = {
	beginloop(0x12)
		if_stage_flag_eq(STAGEFLAG_INTRO_DONE, TRUE, /*goto*/ 0x32)
	endloop(0x12)

	label(0x32)
	restart_timer

	beginloop(0x04)
		if_chr_in_room(CHR_TARGET, 0x00, 0x009a, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0099, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x008f, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0090, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0092, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0093, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0094, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0095, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0096, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0097, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0098, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0099, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x009a, /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		restart_timer

		// @bug: Only Jo gets motion blur?
		label(0x08)
		yield
		call_rng
		if_rand_gt(50, /*goto*/ 0x32)
		add_motion_blur(CHR_BOND, 7, TRUE)
		label(0x32)
		if_timer_lt(460, /*goto*/ 0x32)
		restart_timer
		damage_chr_by_amount(CHR_TARGET, 2, 2)
		label(0x32)
		if_chr_in_room(CHR_TARGET, 0x00, 0x009a, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0099, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x008f, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0090, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0092, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0093, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0094, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0095, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0096, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0097, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0098, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x0099, /*goto*/ 0x06)
		if_chr_in_room(CHR_TARGET, 0x00, 0x009a, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	goto_first(0x08)

	label(0x0d)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1004_jon_msgs_gravedanger[] = {
	beginloop(0x0d)
		if_stage_flag_eq(STAGEFLAG_INTRO_DONE, TRUE, /*goto*/ 0x32)
	endloop(0x0d)

	label(0x32)
	restart_timer

	beginloop(0x04)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	restart_timer
#if VERSION >= VERSION_NTSC_1_0
	speak(CHR_BOND, L_TRA_014, SFX_814F, CHANNEL_4, COLOR_03_RED) // "Joanna - this is Jonathan. You're in grave danger."
#else
	speak(CHR_BOND, L_TRA_014, SFX_814C, CHANNEL_4, COLOR_03_RED) // "Joanna - this is Jonathan. You're in grave danger."
#endif

	beginloop(0x08)
		if_timer_gt(240, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_015, SFX_8150, CHANNEL_4, COLOR_03_RED) // "They've flooded the area with nerve gas."

	beginloop(0x09)
		if_timer_gt(240, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_016, SFX_8151, CHANNEL_4, COLOR_03_RED) // "Get our friend to the containment lab. There's a h..."

	beginloop(0x0a)
		if_timer_gt(270, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_017, SFX_8152, CHANNEL_4, COLOR_03_RED) // "I'll contact you when you get there - good luck!"

	beginloop(0x0c)
		if_timer_gt(240, /*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1005_jon_msgs_meetup[] = {
	beginloop(0x04)
		if_object_in_room(OBJ_HOVERBED, 0x00df, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_stage_flag(STAGEFLAG_ELVIS_STASHED)
	mute_channel(CHANNEL_0)
#if VERSION >= VERSION_NTSC_1_0
	unset_object_flag2(0x0d, OBJFLAG2_LOCKEDFRONT)
#endif
	set_object_flag2(0x0d, OBJFLAG2_LOCKEDBACK)
	unlock_door(0x0d, 0x20)
	release_grabbed_object(CHR_BOND)
	yield
	unset_object_flag3(OBJ_HOVERBED, OBJFLAG3_GRABBABLE)
	unset_object_flag3(OBJ_HOVERBED, OBJFLAG3_PUSHABLE)
	restart_timer
	speak(CHR_BOND, L_TRA_018, SFX_8153, CHANNEL_4, COLOR_03_RED) // "Good work, Jo. We need to meet up. They're getting..."

	beginloop(0x08)
		if_timer_gt(300, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_019, SFX_8154, CHANNEL_4, COLOR_03_RED) // "Use the maintenance hatch I've opened in one of th..."

	beginloop(0x09)
		if_timer_gt(300, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	set_stage_flag(STAGEFLAG_JON_SAID_MAINT_HATCH)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1007_check_medpack_collected[] = {
	beginloop(0x04)
		if_chr_has_object(CHR_BOND, OBJ_MEDPACK_BOND, /*goto*/ 0x06)
		if_chr_has_object(CHR_COOP, OBJ_MEDPACK_BOND, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_stage_flag(STAGEFLAG_COLLECTED_MEDPACK)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0403_init_jonathan[] = {
	set_self_chrflag(CHRCFLAG_PUSHABLE)
	set_self_chrflag(CHRCFLAG_NOAUTOAIM)
	if_difficulty_gt(DIFF_A, /*goto*/ 0x32)

	// Agent only
	beginloop(0x0d)
		chr_move_to_pad(CHR_JONATHAN, PAD_TRA_0398, FALSE, /*goto*/ 0x32)
	endloop(0x0d)

	// All difficulties
	label(0x32)
	add_health_or_armor(1200)
	set_alertness(150)
	set_chr_maxdamage(CHR_SELF, 1)
	set_ailist(CHR_SELF, AILIST_JONATHAN_WAITING_FOR_MEETUP)
	endlist
};

u8 func0402_jonathan_waiting_for_meetup[] = {
	set_shotlist(AILIST_JONATHAN_WAITING_FOR_MEETUP)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
	if_chr_dead(CHR_SELF, /*goto*/ 0x32)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x32)
	goto_next(0x67)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x67)
	set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
	set_self_chrflag(CHRCFLAG_RUNFASTER)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	lock_door(0x0d, 0x20)
	lock_door(0x33, 0x20)
	lock_door(0x34, 0x20)
	speak(CHR_P1P2, L_TRA_025, MP3_02B3, CHANNEL_4, COLOR_03_RED) // "Joanna - over here."
	label(0x08)
	restart_timer
	do_preset_animation(PRESETANIM_TALK3)

	beginloop(0x09)
		if_within_targets_fovx_by_angle(10, /*goto*/ 0x06)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	restart_timer
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x0a)

	beginloop(0x0a)
		if_sound_finished(CHANNEL_4, /*goto*/ 0x32)
		reloop(0x0a)

		label(0x32)
		if_timer_lt(150, /*goto*/ 0x32)
		if_distance_to_target_lt(300, /*goto*/ 0x06)
		label(0x32)
	endloop(0x0a)

	label(0x06)
	speak(CHR_P1P2, L_TRA_026, MP3_02B4, CHANNEL_4, COLOR_03_RED) // "We need to get back to our friend."
	set_stage_flag(STAGEFLAG_MET_JON)
	do_preset_animation(PRESETANIM_TALKRANDOM)
	restart_timer

	beginloop(0x0c)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	stop_chr
	set_ailist(CHR_SELF, AILIST_JONATHAN_FOLLOWING_AND_MINE)
	endlist
};

u8 func0404_jonathan_following_and_mine[] = {
#define LABEL_FOLLOW 0x5a

	set_chr_team(CHR_SELF, TEAM_ALLY)
	yield
	rebuild_teams
	rebuild_squadrons
	set_returnlist(CHR_SELF, AILIST_JONATHAN_FOLLOWING_AND_MINE)
	set_shotlist(AILIST_JONATHAN_FOLLOWING_AND_MINE)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
	if_chr_dead(CHR_SELF, /*goto*/ 0x32)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x32)
	goto_next(0x06)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Unreachable
	if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x32)
	if_self_flag_bankx_eq(CHRFLAG0_SAID_INJURY_QUIP, TRUE, BANK_0, /*goto*/ 0x0d)
	label(0x32)
	goto_next(0x63)

	// Alive
	label(0x06)
	restart_timer

	beginloop(0x64)
		if_chr_stopped(/*goto*/ 0x63)
	endloop(0x64)

	label(0x63)
	if_stage_flag_eq(STAGEFLAG_JON_SHOT_WHILE_PLANTING, TRUE, /*goto*/ 0x0e)
	set_target_chr(CHR_P1P2)
	dprint 'J','O','N','A',' ','F','O','L','L','O','W','\n',0,

	label(LABEL_FOLLOW)
	if_distance_to_target_gt(200, /*goto*/ 0x5c)

	// distance <= 200 (waiting)
	stop_chr
	restart_timer

	beginloop(0x5b)
		label(0x32)
		if_los_to_target(/*goto*/ 0x06)
		goto_next(0x5c)

		label(0x06)
		if_distance_to_target_gt(200, /*goto*/ 0x5c)
	endloop(0x5b)

	// distance > 200
	label(0x5c)
	restart_timer
	if_distance_to_target_lt(300, /*goto*/ 0x32)

	// distance >= 300
	try_run_to_target(/*goto*/ 0x5d)

	// distance > 200 and distance < 300
	label(0x32)
	try_walk_to_target(/*goto*/ 0x5d)

	// Moving towards Jo
	label(0x5d)
		restart_timer
		yield

		label(0x06)
		if_enemy_distance_lt_and_los(1500, /*goto*/ 0x09)

		// distance >= 1500 and no line of sight
		// Note the timer check is pointless here because it is restarted in
		// each loop iteration.
		label(0x32)
		set_target_chr(CHR_P1P2)
		if_distance_to_target_lt(200, /*goto*/ 0x5e)
		if_timer_gt(120, /*goto*/ 0x5e)
		if_chr_stopped(/*goto*/ 0x5e)
	goto_first(0x5d)

	label(0x5e)
	if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x32)
	if_stage_flag_eq(STAGEFLAG_JON_ENTERED_MINE_ROOM, TRUE, /*goto*/ 0x32)
	if_chr_in_room(CHR_JONATHAN, 0x00, 0x00dc, /*goto*/ 0x0a)
	if_chr_in_room(CHR_JONATHAN, 0x00, 0x00dd, /*goto*/ 0x0a)
	goto_first(LABEL_FOLLOW)

	// Unreachable
	if_chr_in_room(CHR_P1P2, 0x00, 0x00dc, /*goto*/ 0x0a)
	if_chr_in_room(CHR_P1P2, 0x00, 0x00dd, /*goto*/ 0x0a)

	label(0x32)
	goto_first(LABEL_FOLLOW)

	// Saw enemy
	label(0x09)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)

	// In mine room
	label(0x0a)
	unset_self_chrflag(CHRCFLAG_PUSHABLE)
	set_stage_flag(STAGEFLAG_JON_ENTERED_MINE_ROOM)
	speak(CHR_P1P2, L_TRA_027, MP3_02B5, CHANNEL_4, COLOR_03_RED) // "Right, we're near. Cover me, Jo..."
	set_shotlist(AILIST_JONATHAN_SHOT_WHILE_PLANTING)
	label(0x0b)
	jog_to_pad(PAD_TRA_038B)

	beginloop(0x0c)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	play_x_track(XREASON_DEFAULT, 10, 30)
	restart_timer
	try_face_entity(ATTACKFLAG_AIMATPAD, 0x0173, /*goto*/ 0xc4)

	beginloop(0xc4)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0xc4)

	label(0x06)
	restart_timer
	set_stage_flag(STAGEFLAG_JON_PLANTING_EXPLOSIVES)

	label(0xc2)
	call_rng
	if_rand_lt(86, /*goto*/ 0x6a)
	if_rand_lt(172, /*goto*/ 0x6b)
	chr_do_animation(ANIM_OPERATE_0204, -1, -1, CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2)
	goto_next(0x0e)

	label(0x6a)
	chr_do_animation(ANIM_OPERATE_0205, -1, -1, CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2)
	goto_next(0x0e)

	label(0x6b)
	chr_do_animation(ANIM_OPERATE_0206, -1, -1, CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2)

	label(0x0e)
	set_shotlist(AILIST_JONATHAN_SHOT_WHILE_PLANTING)
	resume_timer
	unset_self_flag_bankx(CHRFLAG0_SAID_INJURY_QUIP, BANK_0)

	// Mine planting loop (33.3 seconds)
	beginloop(0x0d)
		if_timer_gt(2000, /*goto*/ 0x06)
		if_chr_idle(/*goto*/ 0x32)
		goto_first(0xc2)

		label(0x32)
	endloop(0x0d)

	label(0x06)
	set_shotlist(AILIST_JONATHAN_FOLLOWING_AND_MINE)
	set_stage_flag(STAGEFLAG_JON_FINISHED_EXPLOSIVES)
	unset_stage_flag(STAGEFLAG_JON_SHOT_WHILE_PLANTING)
	set_self_chrflag(CHRCFLAG_PUSHABLE)
	speak(CHR_P1P2, L_TRA_028, MP3_02B6, CHANNEL_4, COLOR_03_RED) // "Okay - stand back."
	run_to_pad(PAD_TRA_0140)

	beginloop(0x0f)
		if_chr_stopped(/*goto*/ 0x12)
	endloop(0x0f)

	label(0x12)
	stop_chr

	beginloop(0x10)
		if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x06)
	endloop(0x10)

	label(0x06)
	unlock_door(0x0a, 0x02)
	speak(CHR_P1P2, L_TRA_032, MP3_02B7, CHANNEL_4, COLOR_03_RED) // "Okay, Jo - let's go."
	restart_timer

	beginloop(0x11)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x11)

	label(0x06)
	goto_first(LABEL_FOLLOW)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0413_jonathan_hangar[] = {
	set_returnlist(CHR_SELF, AILIST_JONATHAN_HANGAR)
	set_shotlist(AILIST_JONATHAN_HANGAR)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
	if_chr_dead(CHR_SELF, /*goto*/ 0x32)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x32)
	goto_next(0x06)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x32)
	if_just_injured(CHR_SELF, /*goto*/ 0x06)
	goto_next(0x63)

	// Injured
	label(0x06)
	restart_timer

	beginloop(0x64)
		if_chr_stopped(/*goto*/ 0x63)
	endloop(0x64)

	// Attack enemy (jumped to from further below)
	label(0x09)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)

	// Alive and well
	label(0x63)
	set_target_chr(CHR_P1P2)
	label(0x12)
	jog_to_pad(PAD_TRA_015F)

	beginloop(0x13)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x32)
#if VERSION >= VERSION_NTSC_1_0
		if_chr_distance_to_pad_lt(CHR_SELF, 3510, PAD_TRA_001E, /*goto*/ 0x06)
#endif
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x13)

	label(0x32)
	goto_first(0x09)

	// Waiting at pad
	label(0x06)
	set_stage_flag(STAGEFLAG_JON_WAITING_AT_UFO)
	stop_chr
	set_target_chr(CHR_P1P2)
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x14)

	// Wait until both Joanna and Elvis within 400 units
	beginloop(0x14)
		set_target_chr(CHR_ELVIS)
		if_distance_to_target_gt(400, /*goto*/ 0x32)
		set_target_chr(CHR_P1P2)
		if_distance_to_target_gt(400, /*goto*/ 0x32)
		if_can_see_target(/*goto*/ 0x06)
		label(0x32)
	endloop(0x14)

	// Start conversation
	label(0x06)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
	restart_timer
	chr_do_animation(ANIM_TALKING_0232, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_ELVIS, 2)
	speak(CHR_P1P2, L_TRA_059, MP3_029A, CHANNEL_5, COLOR_06_WHITE) // "Oh, no! We have a problem. It's a single seater!"

	beginloop(0x7d)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x7d)

		label(0x32)
		if_timer_gt(300, /*goto*/ 0x06)
	endloop(0x7d)

	label(0x06)
	restart_timer
	chr_do_animation(ANIM_TALKING_0233, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_ELVIS, 2)
	speak(CHR_P1P2, L_TRA_060, MP3_029B, CHANNEL_5, COLOR_06_WHITE) // "Two can get in but no more."

	beginloop(0x7e)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x7e)

		label(0x32)
		if_timer_gt(200, /*goto*/ 0x06)
	endloop(0x7e)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_041, MP3_02A7, CHANNEL_5, COLOR_09_BLUE) // "It's the only way out of here."

	beginloop(0x15)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x15)

		label(0x32)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x15)

	label(0x06)
	restart_timer
	chr_do_animation(ANIM_TALKING_0232, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_ELVIS, 2)
	speak(CHR_P1P2, L_TRA_061, MP3_029C, CHANNEL_5, COLOR_06_WHITE) // "Plus, it's got no style, you know what I'm saying?"

	beginloop(0x7f)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x7f)

		label(0x32)
		if_timer_gt(200, /*goto*/ 0x06)
	endloop(0x7f)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_042, MP3_02A8, CHANNEL_5, COLOR_09_BLUE) // "You're the only one who can fly it, Elvis, so get ..."

	beginloop(0x17)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		endloop(0x17)

		label(0x32)
		if_timer_gt(240, /*goto*/ 0x06)
	endloop(0x17)

	label(0x06)
	restart_timer
	chr_do_animation(ANIM_TALKING_0231, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_JONATHAN, 2)
	speak(CHR_P1P2, L_TRA_045, MP3_02B9, CHANNEL_5, COLOR_03_RED) // "One of us will have to stay behind and open the ha..."

	beginloop(0x1a)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x1a)

		label(0x32)
		if_timer_gt(240, /*goto*/ 0x06)
	endloop(0x1a)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_043, MP3_02A9, CHANNEL_5, COLOR_09_BLUE) // "But we can't leave you behind."

	beginloop(0x18)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x18)

		label(0x32)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x18)

	label(0x06)
	restart_timer
	speak(CHR_BOND, L_TRA_044, MP3_02AA, CHANNEL_5, COLOR_09_BLUE) // "There must be a way out of here."

	beginloop(0x19)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3)
		if_sound_finished(CHANNEL_5, /*goto*/ 0x32)
		reloop(0x19)

		label(0x32)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x19)

	label(0x06)
	restart_timer
	chr_do_animation(ANIM_TALKING_0232, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_JONATHAN, 2)
	speak(CHR_P1P2, L_TRA_046, MP3_02BA, CHANNEL_5, COLOR_03_RED) // "I'll get out on that hoverbike. Cover me while I o..."

	beginloop(0x1b)
		if_timer_gt(120, /*goto*/ 0x66)
	reloop(0x1b)

	label(0x66)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x06)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06)
	set_ailist(CHR_ELVIS, AILIST_ELVIS_GO_TO_UFO)

	label(0x06)
	set_stage_flag(STAGEFLAG_HANGAR_CONVERSATION_FINISHED)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	restart_timer
	jog_to_pad(PAD_TRA_016F)

	// Once Jon starts jogging, 4 seconds will pass before he starts checking
	// other things. One of these is a Y check, where the X music will start
	// once he's a certain way up the ramp. The other is a distance to Jo check
	// where she'll take over.
	beginloop(0x1c)
		if_timer_lt(240, /*goto*/ 0x32)
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x32)
		if_chr_y(CHR_SELF, -600, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		set_target_chr(CHR_P1P2)
		if_distance_to_target_lt(300, /*goto*/ 0x59)
		label(0x32)
		if_chr_stopped(/*goto*/ 0x06)
		reloop(0x1c)

		// Jon is up the ramp
		label(0x33)
		set_stage_flag(STAGEFLAG_HANGAR_X_MUSIC_STARTED)
		play_x_track(XREASON_DEFAULT, 10, 90)
		run_to_pad(PAD_TRA_016F)
		set_stage_flag(STAGEFLAG_HANGAR_X_MUSIC_STARTED)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x1c)

	// At first terminal
	label(0x06)
	chr_do_animation(ANIM_OPERATE_0204, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x1d)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x1d)

	label(0x06)
	if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, TRUE, /*goto*/ 0x32)
	set_stage_flag(STAGEFLAG_INNER_DOOR_OPENING)
	open_door(0x2c)
	open_door(0x2d)
	set_object_flag(0x2c, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(0x2d, OBJFLAG_DOOR_KEEPOPEN)
	show_hudmsg(CHR_P1P2, L_TRA_039) // "Inner hangar door is opening."

	label(0x32)
	set_self_flag_bankx(CHRFLAG0_FORCESAFETYCHECKS, BANK_0)
	run_to_pad(PAD_TRA_0171)

	beginloop(0x1e)
		if_chr_distance_to_pad_lt(CHR_SELF, 3690, PAD_TRA_0014, /*goto*/ 0x06)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x1e)

	// At second terminal
	label(0x06)
	chr_do_animation(ANIM_OPERATE_0204, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x1f)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x1f)

	label(0x06)
	if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, TRUE, /*goto*/ 0x20)
	set_stage_flag(STAGEFLAG_OUTER_DOOR_OPENING)
	open_door(0x2e)
	open_door(0x2f)
	set_object_flag(0x2e, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(0x2f, OBJFLAG_DOOR_KEEPOPEN)
	show_hudmsg(CHR_P1P2, L_TRA_037) // "Outer hangar door is opening."

	beginloop(0x20)
		set_ailist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS)
	endloop(0x20)

	// Jo taking over
	label(0x59)
	speak(CHR_BOND, L_TRA_047, MP3_02AC, CHANNEL_5, COLOR_09_BLUE) // "Jonathan, go with Elvis. I'll see to the consoles."
	restart_timer
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x46)

	beginloop(0x46)
		if_target_in_fov_left(10, /*goto*/ 0x06)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x46)

	label(0x06)
	restart_timer

	beginloop(0x4a)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x4a)

	label(0x06)
	set_stage_flag(STAGEFLAG_JO_DOING_TERMINALS)
	set_stage_flag(STAGEFLAG_HANGAR_X_MUSIC_STARTED)
	play_x_track(XREASON_DEFAULT, 10, 90)
	set_ailist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS)

	// Elvis dead
	label(0xc3)
	set_returnlist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS)
	set_ailist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS)
	endlist
};

u8 func041c_elvis_go_to_ufo[] = {
	set_returnlist(CHR_SELF, AILIST_ELVIS_GO_TO_UFO)
	set_shotlist(AILIST_ELVIS_GO_TO_UFO)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
	if_chr_dead(CHR_SELF, /*goto*/ 0x32)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x32)
	goto_next(0x06)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	run_to_pad(PAD_TRA_03FE)

	beginloop(0x08)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	stop_chr

	beginloop(0x6a)
	endloop(0x6a)

	endlist
};

u8 func041b_jonathan_after_terminals[] = {
	set_returnlist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS)
	set_shotlist(AILIST_JONATHAN_AFTER_TERMINALS)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
	if_chr_dead(CHR_SELF, /*goto*/ 0x32)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x32)
	goto_next(0x06)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	run_to_pad(PAD_TRA_015F) // conversation corner

	beginloop(0x4b)
#if VERSION >= VERSION_NTSC_1_0
		if_chr_distance_to_pad_lt(CHR_SELF, 3510, PAD_TRA_0014, /*goto*/ 0x06)
#endif
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x4b)

	label(0x06)
	jog_to_pad(PAD_TRA_0168) // corner near ramp

	beginloop(0x4c)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x09)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x4c)

	label(0x06)
	stop_chr

	beginloop(0x4d)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x09)
	endloop(0x4d)

	label(0x09)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	endlist
};

u8 func0405_jonathan_shot_while_planting[] = {
	set_stage_flag(STAGEFLAG_JON_SHOT_WHILE_PLANTING)
	label(0x04)
	pause_timer
	if_just_injured(CHR_SELF, /*goto*/ 0x06)
	goto_next(0x63)

	// Injured
	label(0x06)
	restart_timer

	beginloop(0x64)
		if_self_flag_bankx_eq(CHRFLAG0_SAID_INJURY_QUIP, TRUE, BANK_0, /*goto*/ 0x06)
		if_num_times_shot_lt(1, /*goto*/ 0x06)
		if_timer_lt(20, /*goto*/ 0x06)
		speak(CHR_P1P2, L_TRA_051, SFX_8155, CHANNEL_5, COLOR_03_RED) // "Damn it, Joanna... cover me!"
		set_self_flag_bankx(CHRFLAG0_SAID_INJURY_QUIP, BANK_0)
		label(0x06)
		if_chr_stopped(/*goto*/ 0x63)
	endloop(0x64)

	// Not injured, or recovered
	label(0x63)
	label(0x0b)
	walk_to_pad(PAD_TRA_038B)

	beginloop(0x0c)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	try_face_entity(ATTACKFLAG_AIMATPAD, 0x0173, /*goto*/ 0xc4)

	beginloop(0xc4)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0xc4)

	label(0x06)
	set_shotlist(AILIST_JONATHAN_FOLLOWING_AND_MINE)
	set_ailist(CHR_SELF, AILIST_JONATHAN_FOLLOWING_AND_MINE)
	endlist
};

/**
 * @unused
 */
u8 func0406_unused_0406[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_MET_JON, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_alertness(100)
#if VERSION >= VERSION_NTSC_1_0
	set_target_chr(CHR_BOND)
#endif
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

/**
 * Waits until the meetup with Jon is done and the player is in the hallway.
 * Spawns 15 guards total, maximum 4 alive at any time. Every 60 seconds, checks
 * to see whether it should spawn more. Stops once 15 have been spawned or Jon
 * has finished planting the explosives.
 */
u8 func1008_spawngroup1[] = {
	// Wait until meeting done and player in the T-junction corridor
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_stage_flag_eq(STAGEFLAG_MET_JON, TRUE, /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		if_chr_in_room(CHR_P1P2, 0x00, 0x003f, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_morale(15)

	beginloop(0x5f)
		// Keep doing this until explosives finished, or 15 guards spawned
		if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x06)
		if_morale_lt(1, /*goto*/ 0x06)
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_00C7, AILIST_SPAWNGROUP1_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		reloop(0x5f)

		// Spawned a guard
		label(0x60)
		yield
		if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x06)
		subtract_morale(1)
		if_num_chrs_in_squadron_gt(3, SPAWNGROUP1, /*goto*/ 0x32)
		reloop(0x5f)

		label(0x32)
		restart_timer

		beginloop(0x08)
			if_timer_gt(3600, /*goto*/ 0x32)
		endloop(0x08)

		label(0x32)
	endloop(0x5f)

	label(0x06)
	yield
	yield
	yield
	yield
	yield
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1008_spawngroup1_guard[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	try_equip_weapon(MODEL_CHRSUPERDRAGON, WEAPON_SUPERDRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
	set_squadron(SPAWNGROUP1)
	run_to_pad(PAD_TRA_013E)
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_CHOOSE_TARGET)
	endlist
};

/**
 * Spawns 12 guards while Jon is planing the explosives. Maximum 4 alive at any
 * time. No delay between them; once one dies another is immediately spawned.
 * Location is spawned guard is one of 2 places, 50% chance of each. Spawning
 * stops when wall explodes.
 */
u8 func1013_spawngroup2[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JON_PLANTING_EXPLOSIVES, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_morale(12)

	beginloop(0x5f)
		if_morale_lt(1, /*goto*/ 0x06)
		call_rng
		if_rand_gt(128, /*goto*/ 0x32)
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_0144, AILIST_SPAWNGROUP2_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		label(0x32)
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_0138, AILIST_SPAWNGROUP2_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		label(0x60)
		yield
		if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x06)
		subtract_morale(1)
		rebuild_teams
		rebuild_squadrons
		label(0x08)
		yield
		if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x06)
		if_num_chrs_in_squadron_gt(4, SPAWNGROUP2, /*goto*/ 0x32)
		call_rng
		if_rand_gt(5, /*goto*/ 0x32)
	endloop(0x5f)

	label(0x32)
	goto_first(0x08)

	label(0x06)
	yield
	yield
	yield
	yield
	yield
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1013_spawngroup2_guard[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	try_equip_weapon(MODEL_CHRSUPERDRAGON, WEAPON_SUPERDRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
	set_squadron(SPAWNGROUP2)
	rebuild_teams
	rebuild_squadrons
#if VERSION >= VERSION_NTSC_1_0
	set_target_chr(CHR_BOND)
#endif
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

/**
 * SA/PA only. Waits until medpack is started, then spawns up to 4 guards.
 *
 * The intended behavior is to spawn them all pretty much immediately with a
 * random delay in between, then wait for them all to be dead, then complete the
 * medpack. But two errors make make this not work as intended.
 *
 * The first error is that if any spawn fails (eg. due to the player looking at
 * the pad) then the ailist jumps straight to the end where it waits for the
 * group to be dead, and does not spawn any more guards.
 *
 * The second error is in the handler for if_all_chrs_in_squadron_are_dead. The
 * implementation of this command has a bug which makes it only check if the
 * most recently spawned guard is dead. If there are no chrs in the squadron
 * (eg. if the first guard fails to spawn) then this check doesn't pass either.
 *
 * In other words:
 * 1) killing the most recently spawned guard will cause the medpack to finish,
 * 2) the spawning process stops if any spawn fails due to the player looking at
 *    the pad, and
 * 3) at least one guard must spawn for an early medpack finish.
 */
u8 func1014_spawngroup3[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x32)
	goto_next(0x04)

	// Agent - do nothing
	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// SA and PA
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_MEDPACK_STARTED, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_morale(4)

	beginloop(0x5f)
		if_morale_lt(1, /*goto*/ 0x06)
		call_rng
		if_rand_gt(128, /*goto*/ 0x32)

		// @bug: If either of these fail to spawn, the ailist jumps straight to
		// the end rather than attempting to respawn them.

		// Spawn at top of ramp
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_0117, AILIST_SPAWNGROUP3_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		// Spawn in mine room
		label(0x32)
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_013E, AILIST_SPAWNGROUP3_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		// Spawned a guard
		label(0x60)
		yield
		if_stage_flag_eq(STAGEFLAG_ELVIS_REVIVED, TRUE, /*goto*/ 0x06)
		subtract_morale(1)
		rebuild_teams
		rebuild_squadrons

		// Wait for Elvis to be revived, or 5 in 256 chance of spawning another
		// guard anyway. Note that the if_num_chrs_in_squadron_gt check can't
		// pass because this squadron never has more than 4 chrs in it.
		label(0x08)
		yield
		if_stage_flag_eq(STAGEFLAG_ELVIS_REVIVED, TRUE, /*goto*/ 0x06)
		if_num_chrs_in_squadron_gt(6, SPAWNGROUP3, /*goto*/ 0x32)
		call_rng
		if_rand_gt(5, /*goto*/ 0x32)
	endloop(0x5f)

	label(0x32)
	goto_first(0x08)

	label(0x06)
	yield
	yield
	yield
	yield
	yield
	rebuild_teams
	rebuild_squadrons

	beginloop(0x0d)
		if_all_chrs_in_squadron_are_dead(SPAWNGROUP3, /*goto*/ 0x06)
	endloop(0x0d)

	label(0x06)
	set_stage_flag(STAGEFLAG_TRIGGER_MEDPACK_FINISH)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1014_spawngroup3_guard[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	try_equip_weapon(MODEL_CHRSUPERDRAGON, WEAPON_SUPERDRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
	set_squadron(SPAWNGROUP3)
	rebuild_teams
	rebuild_squadrons
#if VERSION >= VERSION_NTSC_1_0
	set_target_chr(CHR_BOND)
#endif
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

/**
 * Start spawning guards when the hangar X music starts. Stop spawning when 12
 * reached, or when both hangar doors are open.
 */
u8 func1015_spawngroup4[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	label(0x06)
	set_morale(12)

	beginloop(0x5f)
		call_rng
		if_rand_gt(128, /*goto*/ 0x32)

		// @bug: This is spawning guards using the same function as the previous
		// spawn group. This causes the guards to set their group to spawngroup3
		// which causes the if_num_chrs_in_squadron_gt check further below to
		// never pass.
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_0140, AILIST_SPAWNGROUP3_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		label(0x32)
		try_spawn_chr_at_pad(BODY_AREA51GUARD, HEAD_RANDOM, PAD_TRA_0117, AILIST_SPAWNGROUP3_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x60)
		goto_next(0x06)

		label(0x60)
		yield
		if_stage_flag_eq(STAGEFLAG_BOTH_HANGAR_DOORS_OPEN, TRUE, /*goto*/ 0x06)
		subtract_morale(1)
		rebuild_teams
		rebuild_squadrons

		label(0x08)
		yield
		if_morale_lt(1, /*goto*/ 0x06)
		if_num_chrs_in_squadron_gt(6, SPAWNGROUP4, /*goto*/ 0x32)
		call_rng
		if_rand_gt(2, /*goto*/ 0x32)
	endloop(0x5f)

	label(0x32)
	goto_first(0x08)

	label(0x06)
	yield
	yield
	yield
	yield
	yield
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * @unused
 */
u8 func1015_spawngroup4_guard[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	try_equip_weapon(MODEL_CHRSUPERDRAGON, WEAPON_SUPERDRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
	set_squadron(SPAWNGROUP4)
	rebuild_teams
	rebuild_squadrons
	run_to_pad(PAD_TRA_0168)
	set_ailist(CHR_SELF, GAILIST_CHOOSE_TARGET)
	endlist
};

u8 func1009_blow_up_wall[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	restart_timer

	beginloop(0x08)
		if_timer_gt(300, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	unset_object_flag(OBJ_WALLMINE, OBJFLAG_INVINCIBLE)
	unset_object_flag(OBJ_WALLMINE, OBJFLAG_INVINCIBLE)
	unset_object_flag(OBJ_WALLOBJECT, OBJFLAG_INVINCIBLE)
	unset_object_flag(OBJ_WALLDOOR, OBJFLAG_INVINCIBLE)
	yield
	yield
	destroy_object(OBJ_WALLMINE)
	set_stage_flag(STAGEFLAG_WALL_EXPLODED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100a_check_hangar_accessed[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x00e7, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_stage_flag(STAGEFLAG_ENTERED_HANGAR)
	show_hudmsg(CHR_P1P2, L_TRA_031) // "The secret hangar has been located."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100b_check_jonathan_dead[] = {
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x32)
	goto_next(0x04)

	// A and SA
	label(0x32)
	give_object_to_chr(OBJ_MEDPACK_BOND, CHR_BOND)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32)
	give_object_to_chr(OBJ_MEDPACK_COOP, CHR_COOP)
	goto_next(0x04)

	label(0x32)
	disable_object(OBJ_MEDPACK_COOP)

	// All difficulties
	beginloop(0x04)
		if_chr_dead(CHR_JONATHAN, /*goto*/ 0x06)
		if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x06)
		if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	if_stage_flag_eq(STAGEFLAG_STARTED_OUTRO, TRUE, /*goto*/ 0x32)
	show_hudmsg(CHR_BOND, L_TRA_029) // "Jonathan has been killed."
	set_stage_flag(STAGEFLAG_JON_DEAD)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100c_medpack_activation[] = {
	beginloop(0x67)
		if_stage_flag_eq(STAGEFLAG_ENTERED_HANGAR, TRUE, /*goto*/ 0x04)
	endloop(0x67)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x0c)
		if_chr_activated_object(CHR_P1P2, OBJ_HOVERBED, /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		if_chr_weapon_equipped(CHR_P1P2, WEAPON_AUTOSURGEON, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	set_stage_flag(STAGEFLAG_MEDPACK_STARTED)
	show_hudmsg(CHR_P1P2, L_TRA_033) // "Alien medpack activated."
#if VERSION >= VERSION_NTSC_1_0
	assign_sound(SFX_814C, CHANNEL_7)
#else
	assign_sound(SFX_043C, CHANNEL_7)
#endif
	set_object_sound_playing(CHANNEL_7, OBJ_HOVERBED, TRUE)
	restart_timer

	beginloop(0x12)
		if_timer_gt(120, /*goto*/ 0x32)
	endloop(0x12)

	label(0x32)
#if VERSION >= VERSION_NTSC_1_0
	assign_sound(SFX_814D, CHANNEL_7)
#else
	assign_sound(SFX_047C, CHANNEL_7)
#endif
	set_object_sound_playing(CHANNEL_7, OBJ_HOVERBED, TRUE)
	restart_timer

	beginloop(0x08)
		if_timer_gt(2000, /*goto*/ 0x09)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_MEDPACK_FINISH, TRUE, /*goto*/ 0x09)
	endloop(0x08)

	label(0x09)
	mute_channel(CHANNEL_7)
#if VERSION >= VERSION_NTSC_1_0
	assign_sound(SFX_814E, CHANNEL_7)
#else
	assign_sound(SFX_043D, CHANNEL_7)
#endif
	set_object_sound_playing(CHANNEL_7, 0x00, TRUE)
	show_hudmsg(CHR_P1P2, L_TRA_035) // "Alien medpack has been administered."
	yield

	beginloop(0x0c)
#if VERSION >= VERSION_NTSC_1_0
		chr_toggle_p1p2(CHR_SELF)
#endif
		if_chr_in_room(CHR_P1P2, 0x00, 0x00df, /*goto*/ 0x32)
	endloop(0x0c)

	label(0x32)
	if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x32)
	if_chr_dead(CHR_JONATHAN, /*goto*/ 0x32)
	if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x32)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33)
	if_chr_dead(CHR_BOND, /*goto*/ 0x33)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x33)
	goto_next(0x06)

	// Joanna is dead
	label(0x33)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32)
	if_chr_dead(CHR_COOP, /*goto*/ 0x32)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x32)
	goto_next(0x06)

	// Everyone is alive
	label(0x06)
	set_ailist(CHR_JONATHAN, GAILIST_IDLE)
	set_ailist(CHR_ELVIS, GAILIST_IDLE)
	set_ailist(CHR_SELF, 0x0411)

	// Jonathan is dead
	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0412_init_elvis[] = {
	dprint 'E','L','V','I','S',' ','W','O','K','E','\n',0,
	stop_chr
#if VERSION >= VERSION_NTSC_1_0
	set_self_chrflag(CHRCFLAG_PUSHABLE)
#endif
	set_stage_flag(STAGEFLAG_ELVIS_REVIVED)
	label(0x0a)
	label(0x06)
	add_health_or_armor(200)
	set_chr_maxdamage(CHR_SELF, 1)
	set_ailist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040b_elvis_follow[] = {
	dprint 'E','L','V','I','S',' ','F','O','L','L','O','W','\n',0,
	set_target_chr(CHR_JONATHAN)

	label(0x5a)
		restart_timer

		beginloop(0x5b)
			// @bug: The pad and distance arguments are swapped here, so this is
			// actually checking if Elvis is within 3510 units of pad 0x1e. This
			// pad is up near the start of Infiltration so this will never pass.
#if VERSION >= VERSION_NTSC_1_0
			if_chr_distance_to_pad_lt(CHR_SELF, 3510, 30, /*goto*/ 0x08)
#else
			if_chr_distance_to_pad_lt(CHR_SELF, 3510, 20, /*goto*/ 0x08)
#endif
			if_los_to_target(/*goto*/ 0x06)
			goto_next(0x5c)

			label(0x06)
			if_distance_to_target_gt(200, /*goto*/ 0x5c)
		endloop(0x5b)

		label(0x5c)
		restart_timer
		try_run_to_target(/*goto*/ 0x5d)

		label(0x5d)
			restart_timer
			yield
			label(0x06)
#if VERSION >= VERSION_NTSC_1_0
			if_chr_distance_to_pad_lt(CHR_SELF, 300, PAD_TRA_015F, /*goto*/ 0x08)
#else
			if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_TRA_015F, /*goto*/ 0x08)
#endif
			label(0x32)
			set_target_chr(CHR_JONATHAN)
			if_distance_to_target_lt(200, /*goto*/ 0x5e)
			if_timer_gt(120, /*goto*/ 0x5e)
			if_chr_stopped(/*goto*/ 0x5e)
		goto_first(0x5d)

		label(0x5e)
	goto_first(0x5a)

	label(0x08)
	stop_chr

	beginloop(0x09)
	endloop(0x09)

	endlist
};

u8 func100f_terminals[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, OBJ_TERMINAL1, /*goto*/ 0x08)
		if_chr_activated_object(CHR_P1P2, OBJ_TERMINAL2, /*goto*/ 0x0a)
		reloop(0x04)

		// Terminal 1
		label(0x08)
		assign_sound(SFX_043A, CHANNEL_7)
		set_object_sound_playing(CHANNEL_7, OBJ_TERMINAL1, TRUE)
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x32)
		show_hudmsg(CHR_P1P2, L_TRA_080) // "Console is not active."
		goto_next(0x0f)

		// Terminal 1 active
		label(0x32)
		if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x0f)
		show_hudmsg(CHR_P1P2, L_TRA_039) // "Inner hangar door is opening."
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, FALSE, /*goto*/ 0x32)
		set_stage_flag(STAGEFLAG_INNER_DOOR_OPENING)
		label(0x32)
		open_door(0x2c)
		open_door(0x2d)
		set_object_flag(0x2c, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x2d, OBJFLAG_DOOR_KEEPOPEN)
		reloop(0x04)

		// Terminal 2
		label(0x0a)
		assign_sound(SFX_043A, CHANNEL_7)
		set_object_sound_playing(CHANNEL_7, OBJ_TERMINAL2, TRUE)
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x32)
		show_hudmsg(CHR_P1P2, L_TRA_080) // "Console is not active."
		goto_next(0x0f)

		// Terminal 2 active
		label(0x32)
		if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x0f)
		show_hudmsg(CHR_P1P2, L_TRA_037) // "Outer hangar door is opening."
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, FALSE, /*goto*/ 0x32)
		set_stage_flag(STAGEFLAG_OUTER_DOOR_OPENING)
		label(0x32)
		open_door(0x2e)
		open_door(0x2f)
		set_object_flag(0x2e, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x2f, OBJFLAG_DOOR_KEEPOPEN)
		reloop(0x04)

		// Wait 2 seconds
		label(0x0f)
		restart_timer

		beginloop(0x10)
			if_timer_gt(120, /*goto*/ 0x32)
		endloop(0x10)

		label(0x32)
	endloop(0x04)

	endlist
};

u8 func100d_check_terminals_destroyed[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_TERMINAL1, /*goto*/ 0x06)
		if_door_state(0x2c, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x06)
		goto_next(0x08)

		label(0x06)
		if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_TERMINAL2, /*goto*/ 0x06)
		if_door_state(0x2e, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x06)
		goto_first(0x08)

		label(0x06)
	endloop(0x04)

	label(0x08)
	show_hudmsg(CHR_BOND, L_TRA_036) // "Mission critical object destroyed."
	set_stage_flag(STAGEFLAG_HANGAR_TERMINAL_DESTROYED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100e_check_elvis_dead[] = {
	beginloop(0x04)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0x06)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	if_stage_flag_eq(STAGEFLAG_STARTED_OUTRO, TRUE, /*goto*/ 0x32)
	set_stage_flag(STAGEFLAG_ELVIS_DEAD)
	show_hudmsg(CHR_BOND, L_TRA_030) // "Elvis has been killed."
	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1010_check_end_level[] = {
	beginloop(0x04)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x32)
		if_objective_complete(0, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
#if VERSION < VERSION_NTSC_1_0
		dprint '1','\n',0,
#endif
		if_objective_complete(1, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
#if VERSION < VERSION_NTSC_1_0
		dprint '2','\n',0,
#endif
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x32)
		if_objective_complete(3, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
#if VERSION < VERSION_NTSC_1_0
		dprint '3','\n',0,
#endif
		if_objective_complete(2, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
		if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, FALSE, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
#if VERSION < VERSION_NTSC_1_0
		dprint '4','\n',0,
#endif
		if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
		dprint '5','\n',0,
		if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
	reloop(0x04)

	label(0x32)
	dprint '6','\n',0,
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0f)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x0f)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0f)

	if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x0f)
	if_chr_dead(CHR_JONATHAN, /*goto*/ 0x0f)
	if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x0f)

	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x32)
	if_chr_dead(CHR_BOND, /*goto*/ 0x32)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x32)
	goto_next(0x06)

	// Joanna is dead
	label(0x32)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x33)
	if_chr_dead(CHR_COOP, /*goto*/ 0x33)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x33)
	goto_next(0x06)

	// Both Joanna and Velvet are dead
	label(0x33)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Mission complete
	label(0x06)
	if_stage_flag_eq(STAGEFLAG_JO_DOING_TERMINALS, FALSE, /*goto*/ 0x32)
	set_ailist(CHR_SELF, AILIST_UFO_EXIT)

	label(0x32)
	set_invincible(CHR_BOND)
	set_ailist(CHR_SELF, AILIST_OUTRO)

	// Jonathan and/or Elvis are dead
	label(0x0f)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1011_unlock_doors_when_jo_escaping[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JO_ESCAPE_STARTED, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	unlock_door(0x06, 0x40)
	unlock_door(0x07, 0x40)
	unlock_door(0x08, 0x04)
	unlock_door(0x09, 0x04)
	unlock_door(0x1d, 0x40)
	unlock_door(0x1e, 0x40)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1012_hoverbike_auto_doors[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_stage_flag_eq(STAGEFLAG_JO_ESCAPE_STARTED, TRUE, /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		if_chr_distance_to_pad_lt(CHR_P1P2, 500, PAD_TRA_0176, /*goto*/ 0x08)
		if_chr_distance_to_pad_lt(CHR_P1P2, 500, PAD_TRA_0158, /*goto*/ 0x09)
		if_chr_distance_to_pad_lt(CHR_P1P2, 500, PAD_TRA_00DB, /*goto*/ 0x0a)
		if_chr_distance_to_pad_lt(CHR_P1P2, 500, PAD_TRA_00A1, /*goto*/ 0x0c)
		if_chr_distance_to_pad_lt(CHR_P1P2, 500, PAD_TRA_009E, /*goto*/ 0x0d)
		reloop(0x04)

		// Pad/door 1
		label(0x08)
		if_door_state(0x0a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		set_object_flag(0x0a, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x0a)
		reloop(0x04)

		// Pad/door 2
		label(0x09)
		if_door_state(0x0b, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		set_object_flag(0x0b, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x0b)
		reloop(0x04)

		// Pad/door 3
		label(0x0a)
		if_door_state(0x08, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		set_object_flag(0x08, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x09, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x08)
		open_door(0x09)
		reloop(0x04)

		// Pad/door 4
		label(0x0c)
		if_door_state(0x0c, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		set_object_flag(0x0c, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x0c)
		reloop(0x04)

		// Pad/door 5
		label(0x0d)
		if_door_state(0x05, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		set_object_flag(0x05, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x05)
	endloop(0x04)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040c_hidden_guardtype1[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1016_enable_guards_after_meetup[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_MET_JON, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	enable_chr(0x0d)
	enable_chr(0x0e)
	enable_chr(0x0f)
	enable_chr(0x10)
	enable_chr(0x11)
	enable_chr(0x12)
	enable_chr(0x13)
	enable_chr(0x14)
	enable_chr(0x15)
	enable_chr(0x16)
	unset_chr_chrflag(0x0d, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x0d, CHRCFLAG_INVINCIBLE)
	set_ailist(0x0d, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x0e, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x0e, CHRCFLAG_INVINCIBLE)
	set_ailist(0x0e, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x0f, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x0f, CHRCFLAG_INVINCIBLE)
	set_ailist(0x0f, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x10, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x10, CHRCFLAG_INVINCIBLE)
	set_ailist(0x10, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x11, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x11, CHRCFLAG_INVINCIBLE)
	set_ailist(0x11, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x12, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x12, CHRCFLAG_INVINCIBLE)
	set_ailist(0x12, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x13, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x13, CHRCFLAG_INVINCIBLE)
	set_ailist(0x13, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x14, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x14, CHRCFLAG_INVINCIBLE)
	set_ailist(0x14, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x15, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x15, CHRCFLAG_INVINCIBLE)
	set_ailist(0x15, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x16, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE)
	set_ailist(0x16, AILIST_INIT_SUPERDRAGON_GUARD)
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1017_check_both_hangar_doors_open[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
		if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	show_hudmsg(CHR_BOND, L_TRA_053) // "The hangar doors are now open."
	set_stage_flag(STAGEFLAG_BOTH_HANGAR_DOORS_OPEN)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040d_hidden_guardtype2[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_SELF, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1018_unhide_guards_when_jo_escaping[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JO_ESCAPE_STARTED, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	unset_chr_chrflag(0x16, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE)
	set_ailist(0x16, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x17, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x17, CHRCFLAG_INVINCIBLE)
	set_ailist(0x17, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x18, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x18, CHRCFLAG_INVINCIBLE)
	set_ailist(0x18, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x19, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x19, CHRCFLAG_INVINCIBLE)
	set_ailist(0x19, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1a, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1a, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1a, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1b, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1b, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1b, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1c, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1c, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1c, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1d, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1d, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1d, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1e, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1e, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1e, AILIST_INIT_SUPERDRAGON_GUARD)
	unset_chr_chrflag(0x1f, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x1f, CHRCFLAG_INVINCIBLE)
	set_ailist(0x1f, AILIST_INIT_SUPERDRAGON_GUARD)
	unlock_door(0x0c, 0x40)
	unlock_door(0x15, 0x40)
	unlock_door(0x16, 0x40)
	unlock_door(0x17, 0x40)
	unlock_door(0x18, 0x40)
	unlock_door(0x19, 0x40)
	unlock_door(0x1a, 0x40)
	unlock_door(0x1b, 0x40)
	unlock_door(0x1c, 0x40)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040e_hidden_biotech[] = {
	label(0x04)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1019_enable_biotechs_after_stash[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_ELVIS_STASHED, TRUE, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	unset_chr_chrflag(0x25, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x25, CHRCFLAG_INVINCIBLE)
	set_ailist(0x25, AILIST_INIT_BIOTECH)
	unset_chr_chrflag(0x26, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x26, CHRCFLAG_INVINCIBLE)
	set_ailist(0x26, AILIST_INIT_BIOTECH)
	unset_chr_chrflag(0x27, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x27, CHRCFLAG_INVINCIBLE)
	set_ailist(0x27, AILIST_INIT_BIOTECH)
	unset_chr_chrflag(0x28, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x28, CHRCFLAG_INVINCIBLE)
	set_ailist(0x28, AILIST_INIT_BIOTECH)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1002_intro[] = {
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	play_cutscene_track(MUSIC_ESCAPE_INTRO)
	camera_movement(ANIM_CUT_TRA_INTRO_CAM)
	cmd0175(60)

	set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 4)

	set_chr_chrflag(0x23, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x23, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x23, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x23, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_BIO1, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x23, 4)

	set_chr_chrflag(0x24, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x24, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x24, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x24, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_BIO2, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x24, 4)

	set_object_flag2(OBJ_HOVERBED, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_HOVERBED, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_INTRO_BED, OBJ_HOVERBED, 0x04, 0xffff)
	restart_timer
	fade_to_color(0x000000ff, 0)
	fade_to_color(0x00000000, 90)
	set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_BOND, WEAPON_FALCON2_SCOPE, WEAPON_NONE)

	#define wait_until(time, loopid) \
		beginloop(loopid) \
			if_controller_button_pressed(/*goto*/ 0x68) \
			if_timer_gt(time, /*goto*/ 0x06) \
		endloop(loopid) \
		label(0x06)

	wait_until(2, 0xc5)
	speak(CHR_BOND, L_TRA_081, SFX_81BA, CHANNEL_7, COLOR_02_WHITE) // "What the hell do you think you're doing? This is s..."

	wait_until(60, 0x6a)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(115, 0x6b)
	play_sound(SFX_0162, CHANNEL_6)

	wait_until(156, 0x6c)
	play_sound(SFX_0163, CHANNEL_5)

	wait_until(205, 0x6d)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(260, 0x6e)
	play_sound(SFX_0161, CHANNEL_5)

	wait_until(341, 0x6f)
	play_sound(SFX_0162, CHANNEL_6)
	open_door(0x0e)
	open_door(0x0f)

	wait_until(444, 0x70)
	play_sound(SFX_0163, CHANNEL_5)

	wait_until(468, 0x71)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(490, 0x72)
	play_sound(SFX_0164, CHANNEL_5)

	wait_until(528, 0x73)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(545, 0x8a)
	speak(CHR_BOND, L_TRA_084, MP3_0758, CHANNEL_7, COLOR_09_BLUE) // "I don't care much for procedures!"

	wait_until(588, 0x74)
	play_sound(SFX_0162, CHANNEL_5)

	wait_until(632, 0x75)
	play_sound(SFX_0163, CHANNEL_6)

	wait_until(698, 0x76)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(706, 0x77)

	wait_until(770, 0xc6)
	speak(CHR_BOND, L_TRA_082, MP3_0436, CHANNEL_7, COLOR_02_WHITE) // "Director Easton will hear about this, young lady."

	wait_until(810, 0xbe)
	close_door(0x0e)
	close_door(0x0f)

	wait_until(830, 0x78)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(872, 0x79)
	play_sound(SFX_0162, CHANNEL_4)

	wait_until(998, 0xc7)
	speak(CHR_BOND, L_TRA_083, MP3_0437, CHANNEL_7, COLOR_02_WHITE) // "You can't take that! It's government property! Thi..."

	wait_until(1032, 0x7b)
	play_sound(SFX_0161, CHANNEL_5)

	wait_until(1224, 0x7c)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(1260, 0x7d)
	play_sound(SFX_0163, CHANNEL_4)

	wait_until(1286, 0x7e)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(1325, 0x7f)
	play_sound(SFX_01B9, CHANNEL_6)

	wait_until(1334, 0x80)
	play_sound(SFX_00FB, CHANNEL_CUTSCENE)

	wait_until(1342, 0x81)
	play_sound(SFX_00FB, CHANNEL_CUTSCENE)

	wait_until(1353, 0x82)
	play_sound(SFX_00F9, CHANNEL_CUTSCENE)

	wait_until(1362, 0x83)

	wait_until(1372, 0x84)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)

	wait_until(1388, 0x85)
	play_sound(SFX_01BA, CHANNEL_5)

	wait_until(1396, 0x86)
	play_sound(SFX_00FC, CHANNEL_CUTSCENE)

	wait_until(1432, 0xbf)
	open_door(0x10)

	wait_until(1510, 0x8f)
	play_sound(SFX_0162, CHANNEL_4)

	wait_until(1544, 0x90)
	play_sound(SFX_0163, CHANNEL_6)

	wait_until(1590, 0x91)
	play_sound(SFX_0164, CHANNEL_4)

	wait_until(1624, 0x92)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(1662, 0x93)
	play_sound(SFX_0162, CHANNEL_4)

	wait_until(1716, 0x94)
	play_sound(SFX_01B9, CHANNEL_6)

	wait_until(1730, 0x95)
	play_sound(SFX_00FE, CHANNEL_CUTSCENE)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)

	wait_until(1736, 0x96)
	speak(CHR_BOND, L_TRA_063, MP3_0438, CHANNEL_7, COLOR_02_WHITE) // "Let's see how that overconfident thief deals with ..."
	set_stage_flag(STAGEFLAG_GAS_ON)

	wait_until(1773, 0x9a)
	play_sound(SFX_01BB, CHANNEL_5)

	wait_until(1822, 0xc0)
	close_door(0x10)

	wait_until(1826, 0x9f)
	play_sound(SFX_00FD, CHANNEL_CUTSCENE)

	wait_until(1834, 0xa0)
	play_sound(SFX_00FD, CHANNEL_CUTSCENE)

	wait_until(1850, 0xa1)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)

	wait_until(1926, 0xa4)
	play_sound(SFX_0163, CHANNEL_5)

	wait_until(2146, 0xa5)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(2180, 0xa6)
	play_sound(SFX_0507, CHANNEL_5)

	wait_until(2202, 0xa7)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(2218, 0xa8)
	speak(CHR_BOND, L_TRA_064, MP3_0439, CHANNEL_7, COLOR_09_BLUE) // "What's that noise? Can't be... Gas!"

	wait_until(2271, 0xa9)
	play_sound(SFX_0162, CHANNEL_6)

	wait_until(2300, 0xaa)
	play_sound(SFX_0163, CHANNEL_5)

	wait_until(2362, 0xab)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(2384, 0xac)
	play_sound(SFX_0162, CHANNEL_6)

	wait_until(2428, 0xad)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(2458, 0xae)
	play_sound(SFX_0161, CHANNEL_6)

	wait_until(2582, 0xaf)
	speak(CHR_BOND, L_TRA_065, MP3_043A, CHANNEL_7, COLOR_02_WHITE) // "Noooo, that wasn't meant to happen!"

	wait_until(2725, 0xb1)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2748, 0xb2)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2768, 0x97)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2810, 0x98)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2877, 0x99)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2904, 0xb3)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2924, 0xb5)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)
	play_sound(SFX_0429, CHANNEL_CUTSCENE)

	wait_until(2930, 0xb4)
	play_sound(SFX_COUGH_04AF, CHANNEL_CUTSCENE)

	wait_until(3024, 0x89)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)
	play_sound(SFX_00F9, CHANNEL_CUTSCENE)

	wait_until(3060, 0xb0)
	play_sound(SFX_COUGH_04B0, CHANNEL_CUTSCENE)

	wait_until(3178, 0xb6)
	play_sound(SFX_007D, CHANNEL_6)

	wait_until(3242, 0xb7)
	play_sound(SFX_01DC, CHANNEL_6)
	play_sound(SFX_00FC, CHANNEL_CUTSCENE)

	wait_until(3290, 0xb8)
	play_sound(SFX_01DC, CHANNEL_6)
	play_sound(SFX_00FD, CHANNEL_CUTSCENE)

	wait_until(3334, 0xb9)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)

	wait_until(3894, 0xba)
	speak(CHR_BOND, L_TRA_067, MP3_043B, CHANNEL_7, COLOR_09_BLUE) // "You idiot! We'd better get out of here."

	wait_until(4146, 0xbb)
	play_sound(SFX_0162, CHANNEL_6)

	wait_until(4316, 0xbc)
	play_sound(SFX_0164, CHANNEL_6)

	wait_until(4336, 0xbd)
	play_sound(SFX_0163, CHANNEL_5)

	beginloop(0x08)
		if_camera_animating(/*goto*/ 0x32)
		goto_next(0x68)

		label(0x32)
		if_controller_button_pressed(/*goto*/ 0x68)
		label(0x32)
	endloop(0x08)

	label(0x68)
	set_stage_flag(STAGEFLAG_INTRO_DONE)
	set_stage_flag(STAGEFLAG_GAS_ON)
	mute_channel(CHANNEL_7)
	mute_channel(CHANNEL_6)
	mute_channel(CHANNEL_CUTSCENE)
	unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)

	unset_chr_chrflag(0x23, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(0x23, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_BIO1, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x23, 2)

	unset_chr_chrflag(0x24, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(0x24, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_INTRO_BIO2, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x24, 2)

	unset_object_flag2(OBJ_HOVERBED, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_HOVERBED, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_INTRO_BED, OBJ_HOVERBED, 0x04, 0xfffe)

	drop_concealed_items(0x23)
	drop_concealed_items(0x24)
	stop_cutscene_track
	stop_ambient_track
	enter_firstperson
	revoke_control(CHR_BOND, 0)
	yield
	grab_object(CHR_BOND, OBJ_HOVERBED)
	grant_control(CHR_BOND)
	yield
	kill(0x23)
	kill(0x24)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0c01_midcutscene[] = {
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	play_cutscene_track(MUSIC_ESCAPE_MIDCUTSCENE)
	camera_movement(ANIM_CUT_TRA_MID_CAM)
	cmd0175(60)
	disable_object(OBJ_HOVERBED)
#if VERSION >= VERSION_NTSC_1_0
	set_target_chr(CHR_BOND)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33)
	if_chr_dead(CHR_BOND, /*goto*/ 0x33)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x33)
	goto_next(0x06)

	label(0x33)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x06)
	if_chr_dead(CHR_COOP, /*goto*/ 0x06)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x06)
	set_target_chr(CHR_COOP)

	label(0x06)
	unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN)
#endif
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_JONATHAN, GAILIST_IDLE)

#if VERSION >= VERSION_NTSC_1_0
	set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000)
#else
	set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
#endif
	chr_do_animation(ANIM_CUT_TRA_MID_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, 4)

	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_MID_ELVIS, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_ELVIS, 4)

	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_MID_JON, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_JONATHAN, 4)

	set_object_flag2(OBJ_HOVERBED_EMPTY, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_HOVERBED_EMPTY, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_MID_BED, OBJ_HOVERBED_EMPTY, 0x04, 0xffff)

	show_nonessential_chrs(FALSE)
	if_object_in_room(OBJ_HOVERBIKE, 0x00df, /*goto*/ 0x06)
	goto_next(0x32)

	label(0x06)
	move_object_to_pad(OBJ_HOVERBIKE, PAD_TRA_038A)
	label(0x32)
	restart_timer
	set_cutscene_weapon(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, WEAPON_NONE, WEAPON_NONE)

	wait_until(83, 0x6a)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_069, MP3_043C, CHANNEL_7, COLOR_06_WHITE) // "***aahh...! aahaa...! aaaaahhh! aha. ahh.***"

	wait_until(116, 0x6b)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_6)

	wait_until(124, 0x6c)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_4)

	wait_until(142, 0x6d)
	play_sound(SFX_FOOTSTEP_80C6, CHANNEL_6)

	wait_until(148, 0x6e)
	play_sound(SFX_FOOTSTEP_80C7, CHANNEL_4)

	wait_until(172, 0x6f)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_6)

	wait_until(176, 0x70)
	play_sound(SFX_FOOTSTEP_80C7, CHANNEL_4)

	wait_until(214, 0x71)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_6)

	wait_until(690, 0x72)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_070, MP3_043D, CHANNEL_7, COLOR_06_WHITE) // "I'm alive. I thought I'd be chopped up like the ot..."

	wait_until(1392, 0x73)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_071, MP3_043E, CHANNEL_7, COLOR_09_BLUE) // "You... You speak our language?"

	wait_until(1400, 0x74)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_6)

	wait_until(1554, 0x75)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_072, MP3_043F, CHANNEL_7, COLOR_03_RED) // "Watch her... she's sharp."

	wait_until(1688, 0x76)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_073, MP3_0440, CHANNEL_7, COLOR_06_WHITE) // "Earrggghh...eerggh..."

	wait_until(1962, 0x77)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_074, MP3_0441, CHANNEL_7, COLOR_09_BLUE) // "What's wrong?"

	wait_until(1988, 0x78)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_6)

	wait_until(2014, 0x79)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_4)

	wait_until(2113, 0x7a)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_075, MP3_0442, CHANNEL_7, COLOR_06_WHITE) // "I have a headache. And with a head this big, that'..."

	wait_until(2470, 0x7b)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_076, MP3_0443, CHANNEL_7, COLOR_09_BLUE) // "Can you walk? We must leave before they get organi..."

	wait_until(2480, 0x7c)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_6)

	wait_until(2526, 0x7d)
	play_sound(SFX_FOOTSTEP_80C6, CHANNEL_6)

	wait_until(2624, 0x7e)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_6)

	wait_until(2642, 0x7f)
	play_sound(SFX_FOOTSTEP_80C6, CHANNEL_4)

	wait_until(2678, 0x80)
	play_sound(SFX_FOOTSTEP_80C7, CHANNEL_6)

	wait_until(2712, 0x81)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_4)

	wait_until(2726, 0x82)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_6)

	wait_until(2728, 0x83)
	play_sound(SFX_FOOTSTEP_80C7, CHANNEL_7)

	wait_until(2806, 0x84)
	play_sound(SFX_FOOTSTEP_80C4, CHANNEL_6)

	wait_until(2824, 0x85)
	play_sound(SFX_FOOTSTEP_80C5, CHANNEL_4)

	wait_until(2842, 0x86)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_077, MP3_0444, CHANNEL_7, COLOR_06_WHITE) // "I think so. What's your name?"

	wait_until(3024, 0x87)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_078, MP3_0445, CHANNEL_7, COLOR_09_BLUE) // "I'm Agent Dark. Or Joanna, if you prefer."

	wait_until(3270, 0x88)
	speak(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, L_TRA_079, MP3_0446, CHANNEL_7, COLOR_06_WHITE) // "Well, Joanna, I'm Protector One. But you can call ..."

	wait_until(3308, 0x89)
	play_sound(SFX_FOOTSTEP_80C6, CHANNEL_6)

	beginloop(0x08)
		if_camera_animating(/*goto*/ 0x32)
		goto_next(0x68)

		label(0x32)
		if_controller_button_pressed(/*goto*/ 0x68)
		label(0x32)
	endloop(0x08)

	label(0x68)
	set_stage_flag(STAGEFLAG_INTRO_DONE)
	mute_channel(CHANNEL_7)
	stop_cutscene_track
	stop_ambient_track
	unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_MID_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, VERSION >= VERSION_NTSC_1_0 ? CHR_TARGET : CHR_BOND, 2)

	unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_MID_ELVIS, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_ELVIS, 2)

	unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_MID_JON, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_JONATHAN, 2)

	unset_object_flag2(OBJ_HOVERBED_EMPTY, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_HOVERBED_EMPTY, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_MID_BED, OBJ_HOVERBED_EMPTY, 0x04, 0xfffe)

	unset_object_flag2(0x0a, OBJFLAG2_AICANNOTUSE)
	unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_JONATHAN, AILIST_JONATHAN_HANGAR)
	set_ailist(CHR_ELVIS, AILIST_INIT_ELVIS)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32)
	chr_move_to_pad(CHR_COOP, PAD_TRA_0156, TRUE, /*goto*/ 0x32)
	label(0x32)
	show_nonessential_chrs(TRUE)
	set_ailist(CHR_SELF, GAILIST_END_CINEMA)
	endlist
};

u8 func101b_gas_sound[] = {
	beginloop(0x67)
		if_stage_flag_eq(STAGEFLAG_GAS_ON, TRUE, /*goto*/ 0x04)
	endloop(0x67)

	label(0x04)
	yield
	assign_sound(SFX_816A, CHANNEL_0)
	play_repeating_sound_from_object(CHANNEL_0, 0x2b, 1, 8000, 3000)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0c02_outro[] = {
	open_door(0x2c)
	open_door(0x2e)
	set_object_flag(0x2c, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(0x2d, OBJFLAG_DOOR_KEEPOPEN)
	label(0x32)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	play_cutscene_track(MUSIC_ESCAPE_OUTRO_LONG)
	camera_movement(ANIM_CUT_TRA_OUTRO_CAM_01)
	label(0x32)
	disable_object(OBJ_UFO2)

	enable_object(OBJ_UFO1)
	set_object_flag2(OBJ_UFO1, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_UFO1, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_OUTRO_UFO_01, OBJ_UFO1, 0x04, 0xffff)

	set_stage_flag(STAGEFLAG_STARTED_OUTRO)
	remove_chr(CHR_ELVIS)
	remove_chr(CHR_JONATHAN)
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN)
	show_nonessential_chrs(FALSE)

	beginloop(0x08)
		if_camera_animating(/*goto*/ 0x32)
		goto_next(0x68)

		label(0x32)
		if_controller_button_pressed(/*goto*/ 0x68)
		label(0x32)
	endloop(0x08)

	label(0x68)
	label(0x32)
	camera_movement(ANIM_CUT_TRA_OUTRO_CAM_02)

	enable_object(OBJ_UFO1)
	set_object_flag2(OBJ_UFO1, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_UFO1, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_OUTRO_UFO_02, OBJ_UFO1, 0x04, 0xffff)

	set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x2b, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_OUTRO_GUARD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x2b, 4)

	open_door(0x2c)
	open_door(0x2e)

	beginloop(0x09)
		if_camera_animating(/*goto*/ 0x32)
		goto_next(0x69)

		label(0x32)
		if_controller_button_pressed(/*goto*/ 0x69)
		label(0x32)
	endloop(0x09)

	label(0x69)
	label(0x06)
	disable_object(OBJ_UFO2)
	if_stage_flag_eq(STAGEFLAG_JO_DOING_TERMINALS, FALSE, /*goto*/ 0x32)
	stop_cutscene_track
	stop_ambient_track

	label(0x32)
	goto_next(0x06)

	// Unreachable
	label(0x09)
	set_stage_flag(STAGEFLAG_UFO_LEAVING)
	set_ailist(CHR_SELF, GAILIST_END_CINEMA)

	label(0x06)
	set_stage_flag(STAGEFLAG_ESCAPED)
	yield
	yield
	set_invincible(CHR_BOND)
	revoke_control(CHR_BOND, 4)
	hide_countdown_timer
	stop_countdown_timer
	unset_savefile_flag(GAMEFILEFLAG_DEFENSE_JON)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Makes the UFO exit, when Jo is doing terminals and has to escape via
 * hoverbike.
 */
u8 func0415_ufo_exit[] = {
	configure_environment(0x0000, AIENVCMD_PLAYUFOHUM, 5)
	disable_object(OBJ_UFO2)
	enable_object(OBJ_UFO1)
	set_object_flag2(OBJ_UFO1, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_UFO1, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_OUTRO_UFO_01, OBJ_UFO1, 0x04, 0xffff)
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNEXPLODABLE)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNEXPLODABLE)
	set_stage_flag(STAGEFLAG_UFO_LEAVING)
	restart_timer

	beginloop(0x08)
		if_timer_gt(600, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	configure_environment(0x0000, AIENVCMD_STOPUFOHUM, 0)
	stop_ambient_track
	disable_object(OBJ_UFO1)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1021_jo_escaping[] = {
	beginloop(0x08)
		if_stage_flag_eq(STAGEFLAG_UFO_LEAVING, TRUE, /*goto*/ 0x32)
	endloop(0x08)

	label(0x32)
	set_stage_flag(STAGEFLAG_JO_ESCAPE_STARTED)
	restart_timer

	beginloop(0x0f)
		if_timer_gt(180, /*goto*/ 0x32)
	endloop(0x0f)

	label(0x32)
	set_stage_flag(STAGEFLAG_TRIGGER_JETBIKE_MESSAGE)

	beginloop(0x0a)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0014, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	set_stage_flag(STAGEFLAG_ESCAPED)
	yield
	yield
	set_invincible(CHR_BOND)
	revoke_control(CHR_BOND, 4)
	hide_countdown_timer
	stop_countdown_timer
	label(0x62)
	set_savefile_flag(GAMEFILEFLAG_DEFENSE_JON)
	play_cutscene_track(MUSIC_ESCAPE_OUTRO_LONG)
	camera_movement(ANIM_CUT_TRA_OUTRO_CAM_02)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2_OPPOSITE, CHRCFLAG_HIDDEN)
	set_ailist(CHR_P1P2, GAILIST_IDLE)

	enable_object(OBJ_UFO1)
	set_object_flag2(OBJ_UFO1, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_UFO1, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_TRA_OUTRO_UFO_02, OBJ_UFO1, 0x04, 0xffff)

	set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_TRA_OUTRO_GUARD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_P1P2, 4)

	beginloop(0x09)
		if_camera_animating(/*goto*/ 0x32)
		goto_next(0x69)

		label(0x32)
		if_controller_button_pressed(/*goto*/ 0x69)
		label(0x32)
	endloop(0x09)

	label(0x69)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Unreachable
	end_level
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This is most likely a hidden guard. Spawns clones after meeting Jon until he
 * enters the mine room.
 *
 * There are 4 of these guards, and each one will have one clone alive at a
 * time.
 */
u8 func0416_spawn_during_follow[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_self_chrflag(CHRCFLAG_CLONEABLE)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_INVINCIBLE)

	beginloop(0x04)
		if_los_to_target(/*goto*/ 0x32)
		if_stage_flag_eq(STAGEFLAG_MET_JON, TRUE, /*goto*/ 0x06)
		label(0x32)
		reloop(0x04)

		// Met Jon
		label(0x06)
		label(0x54)
		if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x54)
		reloop(0x04)

		label(0x54)
		try_spawn_clone2(CHR_SELF, AILIST_INIT_FOLLOWER_CLONE, 0, /*goto*/ 0x32)
		reloop(0x04)

		// Spawned
		label(0x32)
		restart_timer

		beginloop(0x08)
			if_stage_flag_eq(STAGEFLAG_JON_ENTERED_MINE_ROOM, TRUE, /*goto*/ 0x32)
			if_timer_gt(1800, /*goto*/ 0x06)
		endloop(0x08)

		label(0x06)
	endloop(0x04)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0417_init_follower_clone[] = {
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	label(0x04)
	rebuild_teams
	rebuild_squadrons
	try_inherit_properties(0x09, /*goto*/ 0x06)
	label(0x06)
	set_ailist(CHR_SELF, AILIST_FOLLOWER_CLONE)
	endlist
};

u8 func0418_follower_clone[] = {
	call_rng
	if_rand_lt(128, /*goto*/ 0x32)
	set_target_chr(CHR_COOP)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32)
	goto_next(0x06)

	label(0x32)
	set_target_chr(CHR_BOND)
	label(0x06)
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

u8 func0419_init_biotech[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(20)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(0)
	set_recovery_speed(0)
	set_shield(0)
	set_returnlist(CHR_SELF, GAILIST_SEARCH_FOR_PLAYER)
	set_ailist(CHR_SELF, GAILIST_SEARCH_FOR_PLAYER)
	endlist
};

u8 func041a_init_superdragon_guard[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(10)
	set_reaction_speed(40)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	set_ailist(CHR_SELF, GAILIST_UNALERTED)
	endlist
};

u8 func101a_medpack_switch[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_object_in_good_condition(OBJ_MEDPACK_SWITCH, /*goto*/ 0x32)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x06)
		set_stage_flag(STAGEFLAG_MEDPACK_SWITCH_DESTROYED)
		show_hudmsg(CHR_BOND, L_TRA_036) // "Mission critical object destroyed."
		label(0x06)
		set_ailist(CHR_SELF, GAILIST_IDLE)

		label(0x32)
		if_chr_activated_object(CHR_P1P2, OBJ_MEDPACK_SWITCH, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	assign_sound(SFX_043A, CHANNEL_7)
	set_object_sound_playing(CHANNEL_7, OBJ_MEDPACK_SWITCH, TRUE)
	show_hudmsg(CHR_P1P2, L_TRA_054) // "Medical containment doors unlocked."
	unlock_door(0x12, 0x40)
	unlock_door(0x13, 0x40)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Warps Jon to the catwalk outside the mine room.
 */
u8 unregistered_function1[] = {
	// Wait until met Jon
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_MET_JON, TRUE, /*goto*/ 0x08)
	endloop(0x04)

	// Wait until player in mine room
	beginloop(0x08)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x00dc, /*goto*/ 0x32)
		if_chr_in_room(CHR_P1P2, 0x00, 0x00dd, /*goto*/ 0x32)
	endloop(0x08)

	label(0x32)
	set_ailist(CHR_JONATHAN, 0x040f)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * @unused
 */
u8 func040f_warp_jon_to_catwalk[] = {
	set_target_chr(CHR_BOND)
	if_los_to_target(/*goto*/ 0x06)
	set_target_chr(CHR_COOP)
	if_los_to_target(/*goto*/ 0x06)
	stop_chr
	yield
	chr_move_to_pad(CHR_JONATHAN, PAD_TRA_0152, FALSE, /*goto*/ 0x32)
	label(0x32)
	yield
	set_ailist(CHR_JONATHAN, AILIST_JONATHAN_FOLLOWING_AND_MINE)
	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101d_msg_medpackaroundhere[] = {
	beginloop(0x04)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x06)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x00d2, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)

	beginloop(0x6a)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x32)
	endloop(0x6a)

	label(0x32)
	speak(CHR_P1P2, L_TRA_055, MP3_03C0, CHANNEL_6, COLOR_09_BLUE) // "The medpack's got to be somewhere around here."
	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101e_msg_hookup[] = {
	restart_timer
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JON_SAID_MAINT_HATCH, TRUE, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)

	beginloop(0x6a)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x32)
	endloop(0x6a)

	label(0x32)
	speak(CHR_BOND, L_TRA_056, MP3_03C1, CHANNEL_6, COLOR_09_BLUE) // "Time to hook up with Jonathan, before he gets into..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101f_msg_oil[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_stage_flag_eq(STAGEFLAG_JON_SAID_MAINT_HATCH, TRUE, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
		if_chr_in_room(CHR_P1P2, 0x00, 0x00dc, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	yield
	yield
	yield

	beginloop(0x6a)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x32)
	endloop(0x6a)

	label(0x32)
	speak(CHR_P1P2, L_TRA_057, MP3_03C2, CHANNEL_6, COLOR_09_BLUE) // "That smell... oil... I smelt that in the other han..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1020_msg_jetbike[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_JETBIKE_MESSAGE, TRUE, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)

	beginloop(0x6a)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x32)
	endloop(0x6a)

	label(0x32)
	speak(CHR_BOND, L_TRA_058, MP3_03C3, CHANNEL_6, COLOR_09_BLUE) // "The jetbike should get me out before they lock the..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1024_wall_immune_to_explosives[] = {
	set_object_flag(OBJ_WALLOBJECT, OBJFLAG_INVINCIBLE)
	set_object_flag(OBJ_WALLDOOR, OBJFLAG_INVINCIBLE)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x32)
	endloop(0x04)

	label(0x32)
	unset_object_flag(OBJ_WALLOBJECT, OBJFLAG_INVINCIBLE)
	unset_object_flag(OBJ_WALLDOOR, OBJFLAG_INVINCIBLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Wait until barrel destroyed then unset immune to explosives on the medpack
 * glass. This wouldn't have worked as intended, as destroying any one barrel
 * would cause the glass to become suscepitble to explosives.
 */
#define glass_explosives_thing(barrel) \
	beginloop(0x04) \
		if_object_in_good_condition(barrel, /*goto*/ 0x32) \
		unset_object_flag(OBJ_MEDPACK_GLASS, OBJFLAG_INVINCIBLE) \
		restart_timer \
 \
		beginloop(0x08) \
			if_timer_gt(60, /*goto*/ 0x06) \
		endloop(0x08) \
 \
		label(0x06) \
		set_object_flag(OBJ_MEDPACK_GLASS, OBJFLAG_INVINCIBLE) \
		set_ailist(CHR_SELF, GAILIST_IDLE) \
		label(0x32) \
	endloop(0x04) \
 \
	set_ailist(CHR_SELF, GAILIST_IDLE)

u8 unregistered_function2[] = {
	set_object_flag(OBJ_MEDPACK_GLASS, OBJFLAG_INVINCIBLE)
	glass_explosives_thing(0x23)
	endlist
};

u8 unregistered_function3[] = {
	glass_explosives_thing(0x24)
	endlist
};

u8 unregistered_function4[] = {
	glass_explosives_thing(0x25)
	endlist
};

u8 unregistered_function5[] = {
	glass_explosives_thing(0x26)
	endlist
};

u8 unregistered_function6[] = {
	glass_explosives_thing(0x27)
	endlist
};

u8 unregistered_function7[] = {
	glass_explosives_thing(0x28)
	endlist
};

u8 unregistered_function8[] = {
	glass_explosives_thing(0x29)
	endlist
};

u8 func1026_ufo_spinning[] = {
	enable_object(OBJ_UFO2)
	set_object_flag2(OBJ_UFO2, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_UFO2, OBJFLAG3_00000010)

	label(0x03)
		object_do_animation(ANIM_0459, OBJ_UFO2, 0x04, 0xffff)
		restart_timer

		beginloop(0x08)
			if_timer_gt(184, /*goto*/ 0x32)
		endloop(0x08)

		label(0x32)
	goto_first(0x03)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func102e_keep_hangar_doors_open[] = {
	beginloop(0x67)
		if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, TRUE, /*goto*/ 0x0f)
		if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x04)
	endloop(0x67)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, TRUE, /*goto*/ 0x0f)
		if_door_state(0x2c, DOORSTATE_CLOSING, /*goto*/ 0x08)
		if_door_state(0x2e, DOORSTATE_CLOSING, /*goto*/ 0x09)
		reloop(0x04)

		// Door 1 closing
		label(0x08)
		if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
		if_door_state(0x2c, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x09)
		reloop(0x04)

		label(0x32)
		open_door(0x2c)
		open_door(0x2d)
		set_object_flag(0x2c, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x2d, OBJFLAG_DOOR_KEEPOPEN)
		reloop(0x04)

		// Door 2 closing
		label(0x09)
		if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
		reloop(0x04)

		label(0x32)
		open_door(0x2e)
		open_door(0x2f)
		set_object_flag(0x2e, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x2f, OBJFLAG_DOOR_KEEPOPEN)
	endloop(0x04)

	// Terminal destroyed
	label(0x0f)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func102f_toggle_remotemines[] = {
	restart_timer
	beginloop(0x08)
		if_timer_gt(2400, /*goto*/ 0x32)
		if_stage_flag_eq(STAGEFLAG_ELVIS_STASHED, TRUE, /*goto*/ 0x06)
	endloop(0x08)

	label(0x32)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	unset_object_flag(OBJ_REMOTEMINES, OBJFLAG_UNCOLLECTABLE)
	unset_object_flag2(OBJ_REMOTEMINES, OBJFLAG2_INVISIBLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1030_setup_medpack_glass[] = {
	if_difficulty_gt(DIFF_A, /*goto*/ 0x32)
	unset_object_flag(OBJ_MEDPACK_GLASS, OBJFLAG_INVINCIBLE)
	destroy_object(OBJ_MEDPACK_GLASS)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// SA and PA
	label(0x32)
	unlock_door(0x3c, 0x40)
	unlock_door(0x3d, 0x40)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1031_disable_chambers[] = {
	set_object_flag(0x46, OBJFLAG_DEACTIVATED)
	set_object_flag(0x47, OBJFLAG_DEACTIVATED)
	set_object_flag(0x48, OBJFLAG_DEACTIVATED)
	set_object_flag(0x49, OBJFLAG_DEACTIVATED)
	set_object_flag(0x4a, OBJFLAG_DEACTIVATED)
	set_object_flag(0x4b, OBJFLAG_DEACTIVATED)
	set_object_flag(0x4c, OBJFLAG_DEACTIVATED)
	set_object_flag(0x4d, OBJFLAG_DEACTIVATED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1032_unlock_door_after_hangar[] = {
	// Wait for locate hangar objective complete
	beginloop(0x04)
		if_objective_complete(2, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	unlock_door(0x0a, 0x02)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This is the lift near the wall you blow up in Rescue.
 */
u8 func1433_start_lift[] = {
	activate_lift(1, 0x4e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101c_setup_rtracker[] = {
	yield
	set_object_flag3(OBJ_FALCON2SCOPE1, OBJFLAG3_RTRACKED_BLUE)
	set_object_flag3(OBJ_FALCON2SCOPE2, OBJFLAG3_RTRACKED_BLUE)
	set_object_flag3(OBJ_REMOTEMINES, OBJFLAG3_RTRACKED_BLUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1434_setup_environment[] = {
	yield
	configure_environment(0x0000, AIENVCMD_00, FALSE)
	configure_environment(0x0000, AIENVCMD_01, FALSE)
	configure_environment(0x0000, AIENVCMD_02, FALSE)
	configure_environment(0x0000, AIENVCMD_03, FALSE)
	configure_environment(0x0000, AIENVCMD_04, FALSE)
	configure_environment(0x00d3, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d4, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d5, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d6, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d7, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d8, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00d9, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00da, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00db, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0024, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0025, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0026, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0027, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0028, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0029, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x002f, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0030, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0032, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0033, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0034, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0035, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0036, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0037, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0038, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0039, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x003f, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x005b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x005d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0079, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x007f, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0080, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0081, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0082, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x008b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x008c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x008d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x008e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x008f, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0090, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0091, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0092, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0093, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0094, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0095, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0096, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0097, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0098, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0099, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x009a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x009b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a5, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a6, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a7, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a8, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a9, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00aa, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ab, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ac, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ad, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ae, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00af, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b0, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b1, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b2, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b3, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b4, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b5, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b6, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b7, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b8, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00b9, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ba, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00bb, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00bc, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00be, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00bf, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c0, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c1, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c2, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c3, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c4, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c5, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c6, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c7, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c8, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00c9, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ca, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00cc, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00cd, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ce, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00cf, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00d0, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00d1, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00d2, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00dc, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00dd, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00de, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00df, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e0, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e1, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e2, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e3, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e4, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e5, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00e6, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00f2, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00fa, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00fb, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00fc, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00fd, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00fe, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00ff, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0100, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0101, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0102, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0103, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0104, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0105, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0106, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0107, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0108, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0109, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x010a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x010b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x010c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x010d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x010e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00cb, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

struct ailist ailists[] = {
	{ func1400_setup_counterop,                0x1400 },
	{ func1001_objectives_failed_msg,          0x1001 },
	{ func1002_intro,                          0x1002 },
	{ func1004_jon_msgs_gravedanger,           0x1004 },
	{ func1005_jon_msgs_meetup,                0x1005 },
	{ func1007_check_medpack_collected,        0x1007 },
	{ func1008_spawngroup1,                    0x1008 },
	{ func1009_blow_up_wall,                   0x1009 },
	{ func100a_check_hangar_accessed,          0x100a },
	{ func100b_check_jonathan_dead,            0x100b },
	{ func100c_medpack_activation,             0x100c },
	{ func100d_check_terminals_destroyed,      0x100d },
	{ func100e_check_elvis_dead,               0x100e },
	{ func100f_terminals,                      0x100f },
	{ func1010_check_end_level,                0x1010 },
	{ func1011_unlock_doors_when_jo_escaping,  0x1011 },
	{ func1012_hoverbike_auto_doors,           0x1012 },
	{ func1013_spawngroup2,                    0x1013 },
	{ func1014_spawngroup3,                    0x1014 },
	{ func1015_spawngroup4,                    0x1015 },
	{ func1016_enable_guards_after_meetup,     0x1016 },
	{ func1017_check_both_hangar_doors_open,   0x1017 },
	{ func1018_unhide_guards_when_jo_escaping, 0x1018 },
	{ func1019_enable_biotechs_after_stash,    0x1019 },
	{ func101a_medpack_switch,                 0x101a },
	{ func101b_gas_sound,                      0x101b },
	{ func101c_setup_rtracker,                 0x101c },
	{ func101d_msg_medpackaroundhere,          0x101d },
	{ func101e_msg_hookup,                     0x101e },
	{ func101f_msg_oil,                        0x101f },
	{ func1020_msg_jetbike,                    0x1020 },
	{ func1021_jo_escaping,                    0x1021 },
	{ func1022_gas_damage_bond,                0x1022 },
	{ func1023_gas_damage_coop,                0x1023 },
	{ func1024_wall_immune_to_explosives,      0x1024 },
	{ func1026_ufo_spinning,                   0x1026 },
	{ func102e_keep_hangar_doors_open,         0x102e },
	{ func102f_toggle_remotemines,             0x102f },
	{ func1030_setup_medpack_glass,            0x1030 },
	{ func1031_disable_chambers,               0x1031 },
	{ func1032_unlock_door_after_hangar,       0x1032 },
	{ func1433_start_lift,                     0x1433 },
	{ func1434_setup_environment,              0x1434 },
	{ func1002_intro,                          0x0c00 },
	{ func0c01_midcutscene,                    0x0c01 },
	{ func0c02_outro,                          0x0c02 },
	{ func0401_gas_damage,                     0x0401 },
	{ func0402_jonathan_waiting_for_meetup,    0x0402 },
	{ func0403_init_jonathan,                  0x0403 },
	{ func0404_jonathan_following_and_mine,    0x0404 },
	{ func0405_jonathan_shot_while_planting,   0x0405 },
	{ func0406_unused_0406,                    0x0406 },
	{ func1008_spawngroup1_guard,              0x0407 },
	{ func1013_spawngroup2_guard,              0x0408 },
	{ func1014_spawngroup3_guard,              0x0409 },
	{ func1015_spawngroup4_guard,              0x040a },
	{ func040b_elvis_follow,                   0x040b },
	{ func040c_hidden_guardtype1,              0x040c },
	{ func0413_jonathan_hangar,                0x0413 },
	{ func040d_hidden_guardtype2,              0x040d },
	{ func040e_hidden_biotech,                 0x040e },
	{ func040f_warp_jon_to_catwalk,            0x040f },
	{ func1002_intro,                          0x0410 },
	{ func0c01_midcutscene,                    0x0411 },
	{ func0412_init_elvis,                     0x0412 },
	{ func0c02_outro,                          0x0414 },
	{ func0415_ufo_exit,                       0x0415 },
	{ func0416_spawn_during_follow,            0x0416 },
	{ func0417_init_follower_clone,            0x0417 },
	{ func0418_follower_clone,                 0x0418 },
	{ func0419_init_biotech,                   0x0419 },
	{ func041a_init_superdragon_guard,         0x041a },
	{ func041b_jonathan_after_terminals,       0x041b },
	{ func041c_elvis_go_to_ufo,                0x041c },
	{ NULL, 0 },
};

struct path paths[] = {
	{ NULL, 0, 0 },
};
